mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
fix coding style. use astyle
This commit is contained in:
parent
d688a5e1cc
commit
bcaa9a2b7a
2 changed files with 12 additions and 11 deletions
|
@ -83,7 +83,8 @@ static timeMs_t timeTunedMs;
|
|||
static int8_t bindOffset_max = 0;
|
||||
static int8_t bindOffset_min = 0;
|
||||
|
||||
static void initialise() {
|
||||
static void initialise()
|
||||
{
|
||||
cc2500Reset();
|
||||
|
||||
cc2500WriteReg(CC2500_02_IOCFG0, 0x01);
|
||||
|
@ -124,7 +125,7 @@ static void initialise() {
|
|||
cc2500WriteReg(CC2500_2E_TEST0, 0x0B);
|
||||
cc2500WriteReg(CC2500_3E_PATABLE, 0xFF);
|
||||
|
||||
for (unsigned c = 0;c < 30; c++) {
|
||||
for (unsigned c = 0; c < 30; c++) {
|
||||
//calibrate all channels
|
||||
cc2500Strobe(CC2500_SIDLE);
|
||||
cc2500WriteReg(CC2500_0A_CHANNR, SFHSSCH2CHANNR(c));
|
||||
|
@ -166,7 +167,7 @@ static bool sfhssPacketParse(uint8_t *packet, bool check_txid)
|
|||
|
||||
if (check_txid) {
|
||||
if ((rxFrSkySpiConfigMutable()->bindTxId[0] != GET_TXID1(packet)) ||
|
||||
(rxFrSkySpiConfigMutable()->bindTxId[1] != GET_TXID2(packet))){
|
||||
(rxFrSkySpiConfigMutable()->bindTxId[1] != GET_TXID2(packet))) {
|
||||
return false; /* txid fail */
|
||||
}
|
||||
}
|
||||
|
@ -206,7 +207,7 @@ static bool tune1Rx(uint8_t *packet)
|
|||
}
|
||||
if ((millis() - timeTunedMs) > 220) { // 220ms
|
||||
timeTunedMs = millis();
|
||||
bindOffset_min += BIND_TUNE_STEP<<2;
|
||||
bindOffset_min += BIND_TUNE_STEP << 2;
|
||||
DEBUG_SET(DEBUG_RX_SFHSS_SPI, DEBUG_DATA_OFFSET_MIN, bindOffset_min);
|
||||
cc2500WriteReg(CC2500_0C_FSCTRL0, (uint8_t)bindOffset_min);
|
||||
cc2500Strobe(CC2500_SRX);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue