Explicit fec for upcoming drivers; Little fixes

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@537 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
focus
2010-04-04 17:23:59 +00:00
parent 461432a941
commit 03b56ffd1c
9 changed files with 158 additions and 131 deletions

View File

@@ -169,13 +169,13 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
wasgrow = 1;
}
//if((last_snr > g_snr) && last_snr > 37000)
if(wasgrow && (last_snr > g_snr) && last_snr > 50) {
if(wasgrow && (last_snr > g_snr) /* && last_snr > 50*/) {
//printf("Must stop rotor!!!\n");
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x60, 0, 0, 0);
moving = 0;
paintStatus();
last_snr = 0;
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
} else
last_snr = g_snr;
} else
@@ -198,7 +198,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
printf("[motorcontrol] left/1 key received... drive/Step motor west, stepMode: %d\n", stepMode);
motorStepWest();
paintStatus();
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
break;
case CRCInput::RC_red:
@@ -207,7 +207,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x60, 0, 0, 0);
moving = 0;
paintStatus();
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
break;
case CRCInput::RC_3:
@@ -215,7 +215,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
printf("[motorcontrol] right/3 key received... drive/Step motor east, stepMode: %d\n", stepMode);
motorStepEast();
paintStatus();
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
break;
case CRCInput::RC_4:
@@ -223,13 +223,13 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
if(g_settings.rotor_swap) lim_cmd = 0x66;
else lim_cmd = 0x67;
g_Zapit->sendMotorCommand(0xE1, 0x31, lim_cmd, 0, 0, 0);
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
break;
case CRCInput::RC_5:
printf("[motorcontrol] 5 key received... disable (soft) limits\n");
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x63, 0, 0, 0);
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
break;
case CRCInput::RC_6:
@@ -237,7 +237,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
if(g_settings.rotor_swap) lim_cmd = 0x67;
else lim_cmd = 0x66;
g_Zapit->sendMotorCommand(0xE1, 0x31, lim_cmd, 0, 0, 0);
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
break;
case CRCInput::RC_7:
@@ -245,19 +245,19 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6B, 1, 0, 0);
satellitePosition = 0;
paintStatus();
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
break;
case CRCInput::RC_8:
printf("[motorcontrol] 8 key received... enable (soft) limits\n");
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6A, 1, 0, 0);
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
break;
case CRCInput::RC_9:
printf("[motorcontrol] 9 key received... (re)-calculate positions\n");
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6F, 1, 0, 0);
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
break;
case CRCInput::RC_plus:
@@ -309,14 +309,14 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
printf("[motorcontrol] left/1 key received... drive/Step motor west, stepMode: %d\n", stepMode);
motorStepWest();
paintStatus();
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
break;
case CRCInput::RC_red:
case CRCInput::RC_2:
printf("[motorcontrol] 2 key received... halt motor\n");
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x60, 0, 0, 0);
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
break;
case CRCInput::RC_3:
@@ -324,14 +324,14 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
printf("[motorcontrol] right/3 key received... drive/Step motor east, stepMode: %d\n", stepMode);
motorStepEast();
paintStatus();
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
break;
case CRCInput::RC_green:
case CRCInput::RC_5:
printf("[motorcontrol] 5 key received... store present satellite number: %d\n", motorPosition);
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6A, 1, motorPosition, 0);
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
break;
case CRCInput::RC_6:
@@ -346,7 +346,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6B, 1, motorPosition, 0);
satellitePosition = 0;
paintStatus();
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
break;
case CRCInput::RC_9:
@@ -360,7 +360,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
printf("[motorcontrol] up key received... increase satellite position: %d\n", ++motorPosition);
satellitePosition = 0;
paintStatus();
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
break;
case CRCInput::RC_minus:
@@ -369,7 +369,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
printf("[motorcontrol] down key received... decrease satellite position: %d\n", motorPosition);
satellitePosition = 0;
paintStatus();
g_Zapit->tune_TP(TP);
//g_Zapit->tune_TP(TP);
break;
case CRCInput::RC_blue: