Skip to content

Commit

Permalink
Merge pull request #22 from sakura-internet/feat/fix_typo
Browse files Browse the repository at this point in the history
fix typo `getSignalQuality()`
  • Loading branch information
chibiegg authored Jan 4, 2017
2 parents 6b502aa + 4c64bbe commit 707267a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void loop() {
```cpp
// Common
uint8_t getConnectionStatus();
uint8_t getSignalQuarity();
uint8_t getSignalQuality();
uint64_t getUnixtime();
uint8_t echoback(uint8_t length, uint8_t *data, uint8_t *response);
Expand Down
2 changes: 1 addition & 1 deletion examples/Shell/commands.ino
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void cmd_status(int argc, char **argv){
}

void cmd_sqi(int argc, char **argv){
uint8_t ret = sakuraio.getSignalQuarity();
uint8_t ret = sakuraio.getSignalQuality();
Serial.println(ret);
}

Expand Down
6 changes: 3 additions & 3 deletions examples/Standard/Standard.ino
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ void loop() {
Serial.print("Status ");
Serial.println(connectionStatus);

//getSignalQuarity
uint8_t signalQuarity = sakuraio.getSignalQuarity();
//getSignalQuality
uint8_t signalQuality = sakuraio.getSignalQuality();
Serial.print("Quality ");
Serial.println(signalQuarity);
Serial.println(signalQuality);


// Tx Queue
Expand Down
7 changes: 6 additions & 1 deletion src/SakuraIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ uint8_t SakuraIO::getConnectionStatus(){
return response[0];
}

uint8_t SakuraIO::getSignalQuarity(){
uint8_t SakuraIO::getSignalQuality(){
uint8_t responseLength = 1;
uint8_t response[1] = {0x00};

Expand All @@ -93,6 +93,11 @@ uint8_t SakuraIO::getSignalQuarity(){
return response[0];
}

uint8_t SakuraIO::getSignalQuarity(){
// deplicated
return getSignalQuality();
}

uint64_t SakuraIO::getUnixtime(){
uint8_t responseLength = 8;
uint8_t response[8] = {0x00};
Expand Down
3 changes: 2 additions & 1 deletion src/SakuraIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ class SakuraIO

public:
uint8_t getConnectionStatus();
uint8_t getSignalQuarity();
uint8_t getSignalQuarity(); // Deplicated
uint8_t getSignalQuality();
uint64_t getUnixtime();
uint8_t echoback(uint8_t length, uint8_t *data, uint8_t *response);
uint16_t getADC(uint8_t channel);
Expand Down

0 comments on commit 707267a

Please sign in to comment.