Polishing code (#803)

This commit is contained in:
Olivier
2017-04-02 20:03:59 +02:00
committed by Embedded Innovation
parent f84960dc28
commit 818f887926
21 changed files with 393 additions and 443 deletions
+3 -18
View File
@@ -23,6 +23,7 @@
#define INVALID_SNR ((int16_t)-256) //!< INVALID_SNR
#define INVALID_RSSI ((int16_t)-256) //!< INVALID_RSSI
#define INVALID_PERCENT ((int16_t)-100) //!< INVALID_PERCENT
#define INVALID_LEVEL ((int16_t)-256) //!< INVALID_LEVEL
#if defined(MY_RX_MESSAGE_BUFFER_FEATURE)
#if defined(MY_RADIO_RFM69)
@@ -92,11 +93,11 @@ bool transportSanityCheck(void);
*/
uint8_t transportReceive(void* data);
/**
* @brief Power down transport HW (if corresponding MY_XXXX_POWER_PIN defined)
* @brief Power down transport HW (if corresponding MY_XYZ_POWER_PIN defined)
*/
void transportPowerDown(void);
/**
* @brief Power up transport HW (if corresponding MY_XXXX_POWER_PIN defined)
* @brief Power up transport HW (if corresponding MY_XYZ_POWER_PIN defined)
*/
void transportPowerUp(void);
/**
@@ -107,22 +108,6 @@ void transportSleep(void);
* @brief Set transport HW to standby
*/
void transportStandBy(void);
// experimental
/**
* @brief transportSignalReport
* @param command
* @return
*/
int16_t transportSignalReport(const char command);
/**
* @brief transportGetSignalReport
* @param signalReport
* @return
*/
int16_t transportGetSignalReport(const signalReport_t signalReport = SR_RX_RSSI);
/**
* @brief transportGetSendingRSSI
* @return RSSI
+3 -3
View File
@@ -174,17 +174,17 @@ int16_t transportGetSendingRSSI(void)
int16_t transportGetReceivingRSSI(void)
{
// not available, only bool RPD
return static_cast<int16_t>(INVALID_RSSI);
return INVALID_RSSI;
}
int16_t transportGetSendingSNR(void)
{
return static_cast<int16_t>(INVALID_SNR);
return INVALID_SNR;
}
int16_t transportGetReceivingSNR(void)
{
return static_cast<int16_t>(INVALID_SNR);
return INVALID_SNR;
}
int16_t transportGetTxPowerPercent(void)
+2 -2
View File
@@ -252,12 +252,12 @@ int16_t transportGetReceivingSNR(void)
int16_t transportGetTxPowerPercent(void)
{
return 0;
return INVALID_PERCENT;
}
int16_t transportGetTxPowerLevel(void)
{
return 0;
return INVALID_LEVEL;
}
#endif
+4 -4
View File
@@ -106,22 +106,22 @@ int16_t transportGetReceivingRSSI(void)
int16_t transportGetSendingSNR(void)
{
return static_cast<int16_t>(RFM95_getSendingSNR());
return RFM95_getSendingSNR();
}
int16_t transportGetReceivingSNR(void)
{
return static_cast<int16_t>(RFM95_getReceivingSNR());
return RFM95_getReceivingSNR();
}
int16_t transportGetTxPowerPercent(void)
{
return static_cast<int16_t>(RFM95_getTxPowerPercent());
return RFM95_getTxPowerPercent();
}
int16_t transportGetTxPowerLevel(void)
{
return static_cast<int16_t>(RFM95_getTxPowerLevel());
return RFM95_getTxPowerLevel();
}
bool transportSetTxPowerPercent(const uint8_t powerPercent)
+4 -4
View File
@@ -381,25 +381,25 @@ void transportStandBy(void)
int16_t transportGetSendingRSSI(void)
{
// not implemented
return static_cast<int16_t>(INVALID_RSSI);
return INVALID_RSSI;
}
int16_t transportGetReceivingRSSI(void)
{
// not implemented
return static_cast<int16_t>(INVALID_RSSI);
return INVALID_RSSI;
}
int16_t transportGetSendingSNR(void)
{
// not implemented
return static_cast<int16_t>(INVALID_SNR);
return INVALID_SNR;
}
int16_t transportGetReceivingSNR(void)
{
// not implemented
return static_cast<int16_t>(INVALID_SNR);
return INVALID_SNR;
}
int16_t transportGetTxPowerPercent(void)