Browse Source

Fix false inclusion bug and decrudify poorly formatted source lines.

master
parent
commit
4b34cb33cb
2 changed files with 12 additions and 12 deletions
  1. +1
    -1
      firmware/SendcommPeer2P/src/ASF/common/boards/board.h
  2. +11
    -11
      firmware/SendcommPeer2P/src/main.c

+ 1
- 1
firmware/SendcommPeer2P/src/ASF/common/boards/board.h View File

@@ -385,9 +385,9 @@ extern "C" {
# include "samr34_xplained_pro/samr34_xplained_pro.h"
#elif BOARD == USER_BOARD
// User-reserved area: #include the header file of your board here (if any).
# include "user_board.h"
#elif BOARD == SAMR34_SENDCOMM && defined(__SAMR34J18B__)
# include "samr34_sendcomm/samr34_sendcomm.h"
# include "user_board.h"
#elif BOARD == DUMMY_BOARD
# include "dummy/dummy_board.h"
#elif BOARD == SAMB11ZR_SENSOR_TAG


+ 11
- 11
firmware/SendcommPeer2P/src/main.c View File

@@ -165,7 +165,7 @@ SYSTEM_TaskStatus_t APP_TaskHandler(void)

// Exit receive mode
radio_exit_receive_mode() ;
// Prepare and transmit buttonCounter
buffer[0] = buttonCounter ;
radio_transmit_uplink(buffer, 1) ;
@@ -196,7 +196,7 @@ void serial_data_handler(void)
/* Configure LoRa Radio for P2P */
static void configure_radio(void)
{
// MAC reset 868 - reset the LoRaWAN stack and initialize it with the parameters of the selected ISM band
// Cmd mac reset 868 - reset the LoRaWAN stack and initialize it with the parameters of the selected ISM band
LORAWAN_Reset(ISM_EU868) ; // Refer to stack_common.h for the definition of IsmBand_t

// Cmd mac pause
@@ -289,13 +289,13 @@ void appData_callback(void *appHandle, appCbParams_t *appdata)
int8_t rssi_value, snr_value ;
RADIO_GetAttr(PACKET_RSSI_VALUE, &rssi_value) ;
RADIO_GetAttr(PACKET_SNR, &snr_value) ;
printf(">> Payload received: ") ;
print_array(pData, dataLength) ;
printf("RSSI Value: %d\r\n", rssi_value) ;
printf("SNR Value: %d", snr_value) ;
printf("\r\n*******************\r\n") ;
LED_On(LED_0_PIN) ;
delay_ms(50) ;
LED_Off(LED_0_PIN) ;
@@ -304,7 +304,7 @@ void appData_callback(void *appHandle, appCbParams_t *appdata)
print_menu() ;
}
}
break ;
break;
case LORAWAN_RADIO_NO_DATA:
{
printf("\n\rRADIO_NO_DATA \n\r");
@@ -333,27 +333,27 @@ void appData_callback(void *appHandle, appCbParams_t *appdata)
break;
default:
printf("UNKNOWN ERROR %d\r\n", status) ;
break ;
break;
}
}
else if(appdata->evt == LORAWAN_EVT_TRANSACTION_COMPLETE)
{
// Uplink Event
// Uplink event
switch(status = appdata->param.transCmpl.status)
{
case LORAWAN_SUCCESS:
case LORAWAN_RADIO_SUCCESS:
printf("Transmission success\r\n") ;
radio_enter_receive_mode() ;
break ;
break;
case LORAWAN_RADIO_NO_DATA:
printf("\r\nRADIO_NO_DATA\r\n") ;
break ;
break;
case LORAWAN_RADIO_BUSY:
printf("\r\nRADIO_BUSY\r\n") ;
break ;
break;
default:
break ;
break;
}
}
}


Loading…
Cancel
Save