New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow users to explicitly set MCS controller data channel value #21
Labels
Comments
pablosun
added a commit
that referenced
this issue
May 31, 2017
pablosun
added a commit
that referenced
this issue
May 31, 2017
We create a template base class MCSControllerBase and let all controller classes inherit the base class. The child classes overrides the string - value conversion routines. Note that GPS and PWM controllers require more work to properly define the value class.
pablosun
added a commit
that referenced
this issue
Jun 1, 2017
…ntrollerGPS The value() of PWM/GPS controller channels are now changed to MCSPWMValue and MCSGPSValue accordingly. We provide extra helper methods such as MCSControllerPWM::dutyCycle() and MCSControllerGPS::altitude() to users to easily access the fields in the value.
pablosun
added a commit
that referenced
this issue
Jun 1, 2017
We should keep the behavior of the original LED_control example.
pablosun
added a commit
that referenced
this issue
Jun 1, 2017
## New features * As requested in #21, Provide new method `setServerValue(value)` for all controller data channels. Developers may use this method to update the MCS/MCSLite server-side values. Once the value is successfully set, the channel becomes both `valid()` and `updated()`. ## Changes * `MCSGPSController` now have a new method `value()` which returns an `MCSGPSValue` object that is a struct of latitude, longitude and altitude. The exisiting methods such as `latitude()` are left unchanged. * `MCSPWMController::value()` has changed: * It now returns a `MCSPWMValue` object instead of the **duty cycle** field. * A new method `dutyCycle()` is added to retrieve the field seperately. * All controller channels are now inherited from a `MCSControllerBase<T>` template class that provides a common implementat for `value()`, `setServerValue()` and `_update()` logics. This reduces some redundant code implementations. Note that **display channels** are left unchanged.
Will be available after v0.7.11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, the MCS controller data channel, such as
MCSControllerOnOff
does not provideset()
to update the data channel value. In some scenarios, such as synchronizing a physical switch with its network counterparts, we need to change the value in MCS from Arduino side.This feature request is adding a new
set()
method to all theMCSController
classes.The text was updated successfully, but these errors were encountered: