Polishing code (#803)
This commit is contained in:
committed by
Embedded Innovation
parent
f84960dc28
commit
818f887926
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user