You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
648B

  1. #include "common.hpp"
  2. #ifdef OSC_ENABLE
  3. #include "../digitalExt/osc/oscCommunicator.hpp"
  4. #include "../digitalExt/osc/oscControl.hpp"
  5. #include "../digitalExt/osc/oscDriver.hpp"
  6. void oscControl::Draw(OSCDriver *drv, bool force)
  7. {
  8. if((force || m_dirty))
  9. {
  10. float v;
  11. if(is_light)
  12. v = getValue();
  13. else
  14. v= rescale(getValue(), pBindedParam->minValue, pBindedParam->maxValue, 0.0, 1.0);
  15. drv->sendMsg(m_address.c_str(), v);
  16. }
  17. m_dirty = false;
  18. m_lastDrawnValue = getValue();
  19. }
  20. void oscControl::ChangeFromGUI(OSCDriver *drv) // gui updated: the new value is already in the binded parameter
  21. {
  22. m_dirty = true;
  23. Draw(drv);
  24. }
  25. #endif //OSC