1
0
Fork 0

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:
curt 2002-12-14 14:37:40 +00:00
parent f332d1b659
commit 339f39f235
2 changed files with 10 additions and 5 deletions

View file

@ -29,7 +29,8 @@
FGProtocol::FGProtocol() : FGProtocol::FGProtocol() :
hz(0.0), hz(0.0),
count_down(0), count_down(0.0),
count(0),
enabled(false) enabled(false)
{ {
} }

View file

@ -42,7 +42,8 @@ class FGProtocol {
private: private:
double hz; double hz;
int count_down; double count_down;
long count;
SGProtocolDir dir; SGProtocolDir dir;
@ -69,9 +70,12 @@ public:
inline double get_hz() const { return hz; } inline double get_hz() const { return hz; }
inline void set_hz( double t ) { hz = t; } inline void set_hz( double t ) { hz = t; }
inline int get_count_down() const { return count_down; } inline double get_count_down() const { return count_down; }
inline void set_count_down( int c ) { count_down = c; } inline void set_count_down( double c ) { count_down = c; }
inline void dec_count_down( int 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 gen_message();
virtual bool parse_message(); virtual bool parse_message();