|
|
|
@ -3626,6 +3626,9 @@ void serial_input() {
|
|
|
|
switch(result) {
|
|
|
|
switch(result) {
|
|
|
|
case 'h':
|
|
|
|
case 'h':
|
|
|
|
case 'H':
|
|
|
|
case 'H':
|
|
|
|
|
|
|
|
Serial.println("Help");
|
|
|
|
|
|
|
|
prompt = PROMPT_HELP;
|
|
|
|
|
|
|
|
/*
|
|
|
|
Serial.println("\nChange settings by typing the letter:");
|
|
|
|
Serial.println("\nChange settings by typing the letter:");
|
|
|
|
Serial.println("h Help info");
|
|
|
|
Serial.println("h Help info");
|
|
|
|
Serial.println("a AFSK/APRS mode");
|
|
|
|
Serial.println("a AFSK/APRS mode");
|
|
|
|
@ -3639,6 +3642,7 @@ void serial_input() {
|
|
|
|
Serial.println("r Resets Count, or payload & EEPROM");
|
|
|
|
Serial.println("r Resets Count, or payload & EEPROM");
|
|
|
|
Serial.println("l Lat and Long");
|
|
|
|
Serial.println("l Lat and Long");
|
|
|
|
Serial.println("? Query sensors\n");
|
|
|
|
Serial.println("? Query sensors\n");
|
|
|
|
|
|
|
|
*/
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 'a':
|
|
|
|
case 'a':
|
|
|
|
@ -3671,30 +3675,31 @@ void serial_input() {
|
|
|
|
|
|
|
|
|
|
|
|
case 'i':
|
|
|
|
case 'i':
|
|
|
|
case 'I':
|
|
|
|
case 'I':
|
|
|
|
Serial.println("Restarts CubeSatsim software");
|
|
|
|
Serial.println("Restart CubeSatsim software");
|
|
|
|
|
|
|
|
prompt = PROMPT_RESTART;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 'c':
|
|
|
|
case 'c':
|
|
|
|
case 'C':
|
|
|
|
case 'C':
|
|
|
|
Serial.println("Change the CALLSIGN in the configuration file sim.cfg");
|
|
|
|
Serial.println("Change the CALLSIGN");
|
|
|
|
prompt = PROMPT_CALLSIGN;
|
|
|
|
prompt = PROMPT_CALLSIGN;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 't':
|
|
|
|
case 't':
|
|
|
|
case 'T':
|
|
|
|
case 'T':
|
|
|
|
Serial.println("Change the Simulated Telemetry setting in sim.cfg");
|
|
|
|
Serial.println("Change the Simulated Telemetry");
|
|
|
|
|
|
|
|
prompt = PROMPT_SIM;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 'r':
|
|
|
|
case 'r':
|
|
|
|
case 'R':
|
|
|
|
case 'R':
|
|
|
|
Serial.println("Change the Resets Count in the configuration file sim.cfg, or ");
|
|
|
|
Serial.println("Change the Resets Count or Reset payload and stored EEPROM values");
|
|
|
|
Serial.println("Reset payload and stored EEPROM values");
|
|
|
|
|
|
|
|
prompt = PROMPT_RESET;
|
|
|
|
prompt = PROMPT_RESET;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 'l':
|
|
|
|
case 'l':
|
|
|
|
case 'L':
|
|
|
|
case 'L':
|
|
|
|
Serial.println("Change the Latitude and Longitude in the configuration file sim.cfg");
|
|
|
|
Serial.println("Change the Latitude and Longitude");
|
|
|
|
prompt = PROMPT_LAT;
|
|
|
|
prompt = PROMPT_LAT;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
@ -3723,6 +3728,22 @@ void prompt_for_input() {
|
|
|
|
|
|
|
|
|
|
|
|
switch(prompt) {
|
|
|
|
switch(prompt) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case PROMPT_HELP:
|
|
|
|
|
|
|
|
Serial.println("\nChange settings by typing the letter:");
|
|
|
|
|
|
|
|
Serial.println("h Help info");
|
|
|
|
|
|
|
|
Serial.println("a AFSK/APRS mode");
|
|
|
|
|
|
|
|
Serial.println("c CW mode");
|
|
|
|
|
|
|
|
Serial.println("f FSK/DUV mode");
|
|
|
|
|
|
|
|
Serial.println("b BPSK mode");
|
|
|
|
|
|
|
|
Serial.println("s SSTV mode");
|
|
|
|
|
|
|
|
Serial.println("i Restart");
|
|
|
|
|
|
|
|
Serial.println("c CALLSIGN");
|
|
|
|
|
|
|
|
Serial.println("t Simulated Telemetry");
|
|
|
|
|
|
|
|
Serial.println("r Resets Count, or payload & EEPROM");
|
|
|
|
|
|
|
|
Serial.println("l Lat and Long");
|
|
|
|
|
|
|
|
Serial.println("? Query sensors\n");
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case PROMPT_CALLSIGN:
|
|
|
|
case PROMPT_CALLSIGN:
|
|
|
|
Serial.println("Editing the CALLSIGN in the onfiguration file for CubeSatSim");
|
|
|
|
Serial.println("Editing the CALLSIGN in the onfiguration file for CubeSatSim");
|
|
|
|
Serial.println("Return keeps current value.");
|
|
|
|
Serial.println("Return keeps current value.");
|
|
|
|
@ -3739,43 +3760,7 @@ void prompt_for_input() {
|
|
|
|
Serial.println("Callsign updated!");
|
|
|
|
Serial.println("Callsign updated!");
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
Serial.println("Callsign not updated!");
|
|
|
|
Serial.println("Callsign not updated!");
|
|
|
|
/*
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo "Editing the CALLSIGN in the"
|
|
|
|
|
|
|
|
echo "configuration file for CubeSatSim"
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo "Return keeps current value."
|
|
|
|
|
|
|
|
# echo -e "Current sim.cfg configuration file:"
|
|
|
|
|
|
|
|
# echo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
value=`cat /home/pi/CubeSatSim/sim.cfg`
|
|
|
|
|
|
|
|
echo "$value" > /dev/null
|
|
|
|
|
|
|
|
set -- $value
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "Current value of CALLSIGN is"
|
|
|
|
|
|
|
|
echo $1
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# echo $1 $2 $3 $4 $5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "Enter callsign in all capitals: "
|
|
|
|
|
|
|
|
read callsign
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ -z $callsign ] ; then
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
callsign="$1"
|
|
|
|
|
|
|
|
echo "Keeping value of" $callsign
|
|
|
|
|
|
|
|
norestart=1
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo -e "\nCubeSatSim configuraation sim.cfg file updated to: \n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo $callsign $2 $3 $4 $5
|
|
|
|
|
|
|
|
echo $callsign $2 $3 $4 $5 > /home/pi/CubeSatSim/sim.cfg
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case PROMPT_SIM:
|
|
|
|
case PROMPT_SIM:
|
|
|
|
@ -3793,7 +3778,10 @@ void prompt_for_input() {
|
|
|
|
case PROMPT_RESET:
|
|
|
|
case PROMPT_RESET:
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
case PROMPT_RESTART:
|
|
|
|
|
|
|
|
Serial.println("Restart not yet implemented");
|
|
|
|
|
|
|
|
break; }
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|