X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Farducontrol.h;fp=source%2Flibr2c2%2Farducontrol.h;h=c3ca7a4106f570a418a6a7166a19a9048c1bcf67;hb=5bc94d60a17039dfd5d46caaa292d3667fa87fb3;hp=555280985767a7e37ea512607a0337359ac11618;hpb=f7238194310b77f21385286150295b284127b887;p=r2c2.git diff --git a/source/libr2c2/arducontrol.h b/source/libr2c2/arducontrol.h index 5552809..c3ca7a4 100644 --- a/source/libr2c2/arducontrol.h +++ b/source/libr2c2/arducontrol.h @@ -117,6 +117,7 @@ private: bool set(T v) { if(v==pending) return false; pending = v; ++serial; return true; } bool commit(unsigned short s) { if(s!=serial) return false; current = pending; return true; } + void rollback() { pending = current; ++serial; } operator T() const { return current; } }; @@ -173,6 +174,7 @@ private: unsigned address; unsigned bits; ControlledVariable state; + unsigned uncertain; unsigned target; Msp::Time::TimeDelta active_time;