Skip to content

Commit

Permalink
Feature: Now you can enable/disable the lib in software
Browse files Browse the repository at this point in the history
  • Loading branch information
stdevPavelmc committed Sep 22, 2016
1 parent 3469fbc commit c5d46fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ft857d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ void ft857d::addCATMSet(void (*userFunc)(byte)) {

// check function
void ft857d::check() {
// do nothing if it was disabled by software
if (!enabled) return;

// first check if we have at least 5 bytes waiting on the buffer
byte i = Serial.available();
if (i < 5) return;
Expand Down
1 change: 1 addition & 0 deletions src/ft857d.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class ft857d {
void addCATGetMode(byte (*)(void));
void addCATSMeter(byte (*)(void));
void addCATTXStatus(byte (*)(void));
boolean enabled = true;

private:
byte nullPad[5] = {0,0,0,0,0};
Expand Down

0 comments on commit c5d46fc

Please sign in to comment.