mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
gui/scan_setup.cpp, gui/motorcontrol.cpp: use per frontend rotor swap option
Origin commit data
------------------
Commit: 929eb86760
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-03-04 (Tue, 04 Mar 2014)
This commit is contained in:
@@ -90,6 +90,7 @@ void CMotorControl::Init(void)
|
||||
satellitePosition = 0;
|
||||
stepDelay = 10;
|
||||
signalbox = NULL;
|
||||
rotor_swap = frontend->getRotorSwap();
|
||||
}
|
||||
|
||||
int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
||||
@@ -197,7 +198,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
||||
else if (msg == CRCInput::RC_4) {
|
||||
if (installerMenue) {
|
||||
printf("[motorcontrol] 4 key received... set west (soft) limit\n");
|
||||
if(g_settings.rotor_swap) lim_cmd = 0x66;
|
||||
if(rotor_swap) lim_cmd = 0x66;
|
||||
else lim_cmd = 0x67;
|
||||
g_Zapit->sendMotorCommand(0xE1, 0x31, lim_cmd, 0, 0, 0);
|
||||
//g_Zapit->tune_TP(TP);
|
||||
@@ -233,7 +234,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
||||
else if (msg == CRCInput::RC_6) {
|
||||
if (installerMenue) {
|
||||
printf("[motorcontrol] 6 key received... set east (soft) limit\n");
|
||||
if(g_settings.rotor_swap) lim_cmd = 0x67;
|
||||
if(rotor_swap) lim_cmd = 0x67;
|
||||
else lim_cmd = 0x66;
|
||||
g_Zapit->sendMotorCommand(0xE1, 0x31, lim_cmd, 0, 0, 0);
|
||||
//g_Zapit->tune_TP(TP);
|
||||
@@ -320,10 +321,10 @@ void CMotorControl::motorStep(bool west)
|
||||
{
|
||||
int cmd;
|
||||
if (west) {
|
||||
if(g_settings.rotor_swap) cmd = 0x68;
|
||||
if(rotor_swap) cmd = 0x68;
|
||||
else cmd = 0x69;
|
||||
} else {
|
||||
if(g_settings.rotor_swap) cmd = 0x69;
|
||||
if(rotor_swap) cmd = 0x69;
|
||||
else cmd = 0x68;
|
||||
}
|
||||
printf("[motorcontrol] motorStep: %s\n", west ? "West" : "East");
|
||||
|
@@ -50,6 +50,7 @@ class CMotorControl : public CMenuTarget
|
||||
void Init(void);
|
||||
CFrameBuffer *frameBuffer;
|
||||
CFrontend *frontend;
|
||||
bool rotor_swap;
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
|
@@ -809,6 +809,11 @@ int CScanSetup::showFrontendSetup(int number)
|
||||
setupMenu->addItem(mc);
|
||||
msettings.Add(mc);
|
||||
|
||||
mc = new CMenuOptionChooser(LOCALE_EXTRA_ROTOR_SWAP, &fe_config.rotor_swap, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, allow_moptions, this);
|
||||
mc->setHint("", LOCALE_MENU_HINT_ROTOR_SWAP);
|
||||
setupMenu->addItem(mc);
|
||||
msettings.Add(mc);
|
||||
|
||||
CMenuForwarder * mf = new CMenuForwarder(LOCALE_MOTORCONTROL_HEAD, allow_moptions, NULL, this, "satfind", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE);
|
||||
mf->setHint("", LOCALE_MENU_HINT_SCAN_SATFIND);
|
||||
setupMenu->addItem(mf);
|
||||
|
Reference in New Issue
Block a user