query STEM payload even in simulated telem mode

pull/139/head
alanbjohnston 4 years ago committed by GitHub
parent c0be10295e
commit feeea11783
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -645,7 +645,7 @@ int main(int argc, char * argv[]) {
// IHUcpuTemp = (int)((cpuTemp * 10.0) + 0.5); // IHUcpuTemp = (int)((cpuTemp * 10.0) + 0.5);
} }
fclose(cpuTempSensor); fclose(cpuTempSensor);
}
if (payload == ON) { // -55 if (payload == ON) { // -55
STEMBoardFailure = 0; STEMBoardFailure = 0;
@ -707,7 +707,7 @@ int main(int argc, char * argv[]) {
payload = OFF; // turn off since STEM Payload is not responding payload = OFF; // turn off since STEM Payload is not responding
} }
if ((sensor_payload[0] == 'O') && (sensor_payload[1] == 'K')) { if ((sensor_payload[0] == 'O') && (sensor_payload[1] == 'K')) {
for (count1 = 0; count1 < 17; count1++) { for (int count1 = 0; count1 < 17; count1++) {
if (sensor[count1] < sensor_min[count1]) if (sensor[count1] < sensor_min[count1])
sensor_min[count1] = sensor[count1]; sensor_min[count1] = sensor[count1];
if (sensor[count1] > sensor_max[count1]) if (sensor[count1] > sensor_max[count1])
@ -715,7 +715,7 @@ int main(int argc, char * argv[]) {
// printf("Smin %f Smax %f \n", sensor_min[count1], sensor_max[count1]); // printf("Smin %f Smax %f \n", sensor_min[count1], sensor_max[count1]);
} }
} }
} // }
#ifdef DEBUG_LOGGING #ifdef DEBUG_LOGGING
fprintf(stderr, "INFO: Battery voltage: %5.2f V Threshold %5.2f V Current: %6.1f mA Threshold: %6.1f mA\n", batteryVoltage, voltageThreshold, batteryCurrent, currentThreshold); fprintf(stderr, "INFO: Battery voltage: %5.2f V Threshold %5.2f V Current: %6.1f mA Threshold: %6.1f mA\n", batteryVoltage, voltageThreshold, batteryCurrent, currentThreshold);
@ -1764,10 +1764,10 @@ void write_wave(int i, short int *buffer)
else else
{ {
if ((ctr - flip_ctr) < smaller) if ((ctr - flip_ctr) < smaller)
// buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); // buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE)));
buffer[ctr++] = (short int)(phase * sin_map[ctr % sin_samples] / 2); buffer[ctr++] = (short int)(phase * sin_map[ctr % sin_samples] / 2);
else else
// buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(amplitude * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); // buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(amplitude * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE)));
buffer[ctr++] = (short int)(phase * sin_map[ctr % sin_samples]); } buffer[ctr++] = (short int)(phase * sin_map[ctr % sin_samples]); }
// printf("%d %d \n", i, buffer[ctr - 1]); // printf("%d %d \n", i, buffer[ctr - 1]);

Loading…
Cancel
Save

Powered by TurnKey Linux.