From 95931f7e6ef5431191309e0c247e293bf40afce8 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 23 Nov 2018 15:17:10 +0100 Subject: fix whitespaces --- usb-lora/usb-lora.cpp | 56 +++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/usb-lora/usb-lora.cpp b/usb-lora/usb-lora.cpp index c0ad3ae..3d48031 100644 --- a/usb-lora/usb-lora.cpp +++ b/usb-lora/usb-lora.cpp @@ -37,35 +37,35 @@ RH_RF95 lora; void recv_lora_msg() { - uint8_t buf[RH_RF95_MAX_MESSAGE_LEN]; - uint8_t len = sizeof(buf); - - led_on(); - if(!lora.recv(buf, &len)) { - printf("lora.recv(): failed\r\n"); - led_off(); - return; - } - - printf("lora.recv() got message: SNR = %d, data = ", lora.lastSNR()); - for(uint8_t i = 0; i < len; ++i) printf("%s0x%02X", (i==0) ? "" : " ", buf[i]); - printf("\r\n"); - led_off(); + uint8_t buf[RH_RF95_MAX_MESSAGE_LEN]; + uint8_t len = sizeof(buf); + + led_on(); + if(!lora.recv(buf, &len)) { + printf("lora.recv(): failed\r\n"); + led_off(); + return; + } + + printf("lora.recv() got message: SNR = %d, data = ", lora.lastSNR()); + for(uint8_t i = 0; i < len; ++i) printf("%s0x%02X", (i==0) ? "" : " ", buf[i]); + printf("\r\n"); + led_off(); } void send_lora_msg() { - uint8_t data[] = "spreadspace.org/avr-utils usb-lora test using radiohead library"; - - led2_on(); - if(!lora.send(data, sizeof(data))) { - printf("lora.send(): failed\r\n"); - led2_off(); - return; - } - lora.waitPacketSent(); - printf("lora.send(): success\r\n"); - led2_off(); + uint8_t data[] = "spreadspace.org/avr-utils usb-lora test using radiohead library"; + + led2_on(); + if(!lora.send(data, sizeof(data))) { + printf("lora.send(): failed\r\n"); + led2_off(); + return; + } + lora.waitPacketSent(); + printf("lora.send(): success\r\n"); + led2_off(); } void handle_cmd(uint8_t cmd) @@ -92,9 +92,9 @@ int main(void) lora.setFrequency(868.0); for(;;) { - if(lora.available()) { - recv_lora_msg(); - } + if(lora.available()) { + recv_lora_msg(); + } int16_t BytesReceived = usbio_bytes_received(); while(BytesReceived > 0) { -- cgit v1.2.3