Change time counter to a double. Add a variable which can allow us to
track long term rate stats to verify we are hitting the requested hz.
This commit is contained in:
parent
f332d1b659
commit
339f39f235
2 changed files with 10 additions and 5 deletions
|
@ -29,7 +29,8 @@
|
|||
|
||||
FGProtocol::FGProtocol() :
|
||||
hz(0.0),
|
||||
count_down(0),
|
||||
count_down(0.0),
|
||||
count(0),
|
||||
enabled(false)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -42,7 +42,8 @@ class FGProtocol {
|
|||
private:
|
||||
|
||||
double hz;
|
||||
int count_down;
|
||||
double count_down;
|
||||
long count;
|
||||
|
||||
SGProtocolDir dir;
|
||||
|
||||
|
@ -69,9 +70,12 @@ public:
|
|||
|
||||
inline double get_hz() const { return hz; }
|
||||
inline void set_hz( double t ) { hz = t; }
|
||||
inline int get_count_down() const { return count_down; }
|
||||
inline void set_count_down( int c ) { count_down = c; }
|
||||
inline void dec_count_down( int c ) { count_down -= c; }
|
||||
inline double get_count_down() const { return count_down; }
|
||||
inline void set_count_down( double c ) { count_down = c; }
|
||||
inline void inc_count_down( double amt ) { count_down += amt; }
|
||||
inline void dec_count_down( double amt ) { count_down -= amt; }
|
||||
inline void inc_count() { count++; }
|
||||
inline long get_count() { return count; }
|
||||
|
||||
virtual bool gen_message();
|
||||
virtual bool parse_message();
|
||||
|
|
Loading…
Reference in a new issue