summaryrefslogtreecommitdiff
path: root/CommandTerminal/CmdFactoryDefault.cpp
blob: e2645cd1161e385654cc531ea4613b56f2fa94ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "CmdFactoryDefault.h"

CmdFactoryDefault::CmdFactoryDefault(mDot* dot) : Command(dot, "Reset Factory Defaults", "AT&F", "Reset current configuration to factory defaults")
{
    _help = std::string(text()) + ": " + std::string(desc());
}


uint32_t CmdFactoryDefault::action(std::vector<std::string> args)
{
    _dot->resetConfig();

//Factory defaults for the DotBox.
    _dot->setTxDataRate(mDot::SF_7);
    _dot->setFrequencySubBand(1);
    _dot->setWakeDelay(242);		//DotBox +MaxSize is stored here. Default is 242.
    _dot->setWakeInterval(11);		//DotBox +MinSize is stored here. Default is 11.
    _dot->setWakeMode(20);		//DotBox +MaxPwr is stored here. Default is 20.
    _dot->setWakeTimeout(2);		//DotBox +MinPwr is stored here. Default is 2.
    _dot->setStartUpMode(0);		//DotBox +Data is stored here. Default is 0.
    _dot->setVerbose(1);
    _dot->setEcho(1);
	
    _dot->resetNetworkSession();
    return 0;
}