Skip to content

Commit

Permalink
Move global variables to class atributes to make it possible to defin…
Browse files Browse the repository at this point in the history
…e 2 sensors running independantly (#20)
  • Loading branch information
4m1g0 authored Jan 22, 2021
1 parent 8a063e7 commit d2dbf58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions MHZ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ const int STATUS_NOT_READY = -5;
const int STATUS_PWM_NOT_CONFIGURED = -6;
const int STATUS_SERIAL_NOT_CONFIGURED = -7;

unsigned long lastRequest = 0;

bool SerialConfigured = true;
bool PwmConfigured = true;

MHZ::MHZ(uint8_t rxpin, uint8_t txpin, uint8_t pwmpin, uint8_t type) {
SoftwareSerial * ss = new SoftwareSerial(rxpin, txpin);
_pwmpin = pwmpin;
Expand Down
5 changes: 5 additions & 0 deletions MHZ.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ class MHZ {

Stream * _serial;
byte getCheckSum(byte *packet);

unsigned long lastRequest = 0;

bool SerialConfigured = true;
bool PwmConfigured = true;
};

#endif

0 comments on commit d2dbf58

Please sign in to comment.