Elmo Terminal provides functionality to test Lora radio and access SX1272 chip registers delivered with Elmo board. This firmware allows the user to control the LoRa radio parameters (eg. frequency, bandwidth, spreading factor etc.) by entering console commands via serial terminal. Application also contains "Ping-Pong" and data transmission functionalities.
Fork of Elmo-Terminal by
Commands/RxCmd.cpp
- Committer:
- WGorniak
- Date:
- 2015-10-22
- Revision:
- 12:26045241f50f
- Parent:
- 2:8d8295a51f68
File content as of revision 12:26045241f50f:
#include "RxCmd.h" RxCmd::RxCmd(Settings* radioSettings) : RadioCmd(radioSettings) { queryable_ = true; p = getRadioContex(); } RxCmd::~RxCmd() { } bool RxCmd::execute(list<string> args) { debug( "Performing rx\r\n" ); p->initReceive(); return true; } Cmd::Status RxCmd::process() { if (p->pool_rx()) { printf("received: %s, rssi: %d, snr %d\r\n", p->Buffer, p->radio_->rssi_current_packet, p->radio_->snr_value); } return CONTINUE; } string RxCmd::cmd() { return "rx"; } string RxCmd::desc() { return "enables receive mode (looped)- rx"; } string RxCmd::getResponse(void) { return "rx cmd rulez!"; }