contain lorawan with serial_rx enabled
Dependencies: pulga-lorawan-drv SPI_MX25R Si1133 BME280
serial_cmds.cpp@62:89df9529dbb0, 2021-02-26 (annotated)
- Committer:
- ruschigo
- Date:
- Fri Feb 26 17:07:12 2021 +0000
- Revision:
- 62:89df9529dbb0
- Child:
- 63:4ec1808fb547
insert serial_rx
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ruschigo | 62:89df9529dbb0 | 1 | #include "serial.h" |
ruschigo | 62:89df9529dbb0 | 2 | |
ruschigo | 62:89df9529dbb0 | 3 | bool SerialCommandRun(const char *msg) |
ruschigo | 62:89df9529dbb0 | 4 | { |
ruschigo | 62:89df9529dbb0 | 5 | char Option = msg[1]; /// recebo opcao |
ruschigo | 62:89df9529dbb0 | 6 | |
ruschigo | 62:89df9529dbb0 | 7 | switch (Option) |
ruschigo | 62:89df9529dbb0 | 8 | { |
ruschigo | 62:89df9529dbb0 | 9 | |
ruschigo | 62:89df9529dbb0 | 10 | case CMD_PRINT_LAST_GPS: |
ruschigo | 62:89df9529dbb0 | 11 | int local_lat, local_log |
ruschigo | 62:89df9529dbb0 | 12 | gps_get_lat_lon(&local_lat, &local_log) |
ruschigo | 62:89df9529dbb0 | 13 | pc.printf("<g%d,%d\n>", local_lat, local_log); |
ruschigo | 62:89df9529dbb0 | 14 | break; |
ruschigo | 62:89df9529dbb0 | 15 | |
ruschigo | 62:89df9529dbb0 | 16 | |
ruschigo | 62:89df9529dbb0 | 17 | default: |
ruschigo | 62:89df9529dbb0 | 18 | break; |
ruschigo | 62:89df9529dbb0 | 19 | } |
ruschigo | 62:89df9529dbb0 | 20 | |
ruschigo | 62:89df9529dbb0 | 21 | return true; |
ruschigo | 62:89df9529dbb0 | 22 | } |