Skip to content

Commit

Permalink
Update JIABAILE_nrf24l01.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
pascallanger committed Jan 27, 2025
1 parent a07c23b commit 7af2301
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Multiprotocol/JIABAILE_nrf24l01.ino
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ enum {
static uint8_t __attribute__((unused)) JIABAILE_channel(uint8_t num)
{
uint8_t val=convert_channel_16b_limit(num,0,100);
if(val>50)
if(val > 50+num)
{
packet[3] |= 0x01;
return val-50;
}
if(val<50)
if(val < 50-num)
{
packet[3] |= 0x02;
return 50-val;
Expand Down Expand Up @@ -77,7 +77,7 @@ static void __attribute__((unused)) JIABAILE_send_packet()
XN297_SetPower();
XN297_SetTxRxMode(TX_EN);
XN297_WritePayload(packet, JIABAILE_PAYLOAD_SIZE);
#ifdef ADEBUG_SERIAL
#ifdef DEBUG_SERIAL
debug("H%d RF%d",hopping_frequency_no,hopping_frequency[hopping_frequency_no]);
for(uint8_t i=0; i < JIABAILE_PAYLOAD_SIZE; i++)
debug(" %02X", packet[i]);
Expand Down

0 comments on commit 7af2301

Please sign in to comment.