Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: DISCO_IOT-wifi_client
Fork of stm-spirit1-rf-driver by
Diff: SimpleSpirit1.h
- Revision:
- 11:b769d6caad82
- Parent:
- 9:3db68ab23070
- Child:
- 12:b8056eda4028
--- a/SimpleSpirit1.h Tue Oct 25 10:56:52 2016 +0200
+++ b/SimpleSpirit1.h Wed Oct 26 15:08:44 2016 +0200
@@ -401,11 +401,17 @@
/** Get latest value of RSSI **/
float get_last_rssi_dbm(void) {
+ if(last_rssi == 0) {
+ last_rssi = qi_get_rssi();
+ }
return (-120.0+((float)(last_rssi-20))/2);
}
/** Get latest value of LQI **/
uint8_t get_last_lqi(void) {
+ if(last_lqi == 0) {
+ last_lqi = qi_get_lqi();
+ }
return last_lqi;
}
