This is the vcdMaker demo project. See http://vcdmaker.org for details. vcdMaker is supposed to help engineers to debug their applications and systems. It transforms text log files into the VCD format which can be easily displayed as a waveform.
Dependencies: mbed vcdLogger vcdSignal
Diff: Signals/slider.cpp
- Revision:
- 0:9a59cffaafad
- Child:
- 1:446154224f92
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Signals/slider.cpp Fri Feb 12 21:38:04 2016 +0000 @@ -0,0 +1,22 @@ +#include "slider.hpp" + +Slider::Slider(const string& name, Logger& logger) : Signal(name, 7, logger) +{ + m_SliderPrev = 0; + m_SliderCurr = 0; +} + +void Slider::PrintState() +{ + string suffix(""); + string msg(""); + int32_t time_ref = 0; + + m_SliderCurr = m_Slider.readPercentage() * 100; + if ( (CheckFilter()) || \ + (fabs((float)(m_SliderCurr - m_SliderPrev)) > 0)) + { + PrintVector(m_SliderCurr, suffix, msg, time_ref); + m_SliderPrev = m_SliderCurr; + } +}