summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2018-11-23 15:17:10 +0100
committerChristian Pointner <equinox@spreadspace.org>2018-11-23 15:17:10 +0100
commit95931f7e6ef5431191309e0c247e293bf40afce8 (patch)
treec730c7cd6c593ccc06cd712f6a07ca46cafe038f
parentimproved handling for __cxa_.._virtual() functions (diff)
fix whitespaces
-rw-r--r--usb-lora/usb-lora.cpp56
1 files 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) {