diff --git a/afsk/main.c b/afsk/main.c index c681df1f..6c6d1d50 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -127,6 +127,9 @@ int cw_id = ON; int vB4 = FALSE, vB5 = FALSE, ax5043 = FALSE, transmit = FALSE, onLed, onLedOn, onLedOff, txLed, txLedOn, txLedOff, payload = OFF; float batteryThreshold = 0; +char pythonCmd = "ython3 /home/pi/CubeSatSim/python/voltcurrent.py "; +char pythonStr[100]; + struct SensorConfig { int fd; uint16_t config; @@ -481,9 +484,14 @@ else tempSensor = config_sensor("/dev/i2c-3", 0x48, 0); } - FILE* file1 = popen("python3 /home/pi/CubeSatSim/python/voltcurrent.py 1 11 c", "r"); + strcpy(pythonStr, pythonCmd); + strcat(pythonStr, "1 11 c") + +// FILE* file1 = popen("python3 /home/pi/CubeSatSim/python/voltcurrent.py 1 11 c", "r"); + FILE* file1 = popen(pythonStr, "r"); char cmdbuffer[1000]; fgets(cmdbuffer, 1000, file1); + printf("pythonStr result: %s\n", cmdbuffer); pclose(file1); // try connecting to Arduino payload using UART