From 4c64bbe235ccd74fc2cef781734e45742899d37a Mon Sep 17 00:00:00 2001 From: chibiegg Date: Thu, 5 Jan 2017 04:51:24 +0900 Subject: [PATCH] fix typo `getSignalQuality()` --- README.md | 2 +- examples/Shell/commands.ino | 2 +- examples/Standard/Standard.ino | 6 +++--- src/SakuraIO.cpp | 7 ++++++- src/SakuraIO.h | 3 ++- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ae58b57..1281790 100644 --- a/README.md +++ b/README.md @@ -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); diff --git a/examples/Shell/commands.ino b/examples/Shell/commands.ino index c14080f..e060f70 100644 --- a/examples/Shell/commands.ino +++ b/examples/Shell/commands.ino @@ -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); } diff --git a/examples/Standard/Standard.ino b/examples/Standard/Standard.ino index c1b187f..4569725 100644 --- a/examples/Standard/Standard.ino +++ b/examples/Standard/Standard.ino @@ -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 diff --git a/src/SakuraIO.cpp b/src/SakuraIO.cpp index 1275dec..059e442 100644 --- a/src/SakuraIO.cpp +++ b/src/SakuraIO.cpp @@ -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}; @@ -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}; diff --git a/src/SakuraIO.h b/src/SakuraIO.h index ea9ba16..f7ebd31 100644 --- a/src/SakuraIO.h +++ b/src/SakuraIO.h @@ -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);