diff --git a/main.c b/main.c index cf315dd5..8b0c8835 100644 --- a/main.c +++ b/main.c @@ -647,7 +647,7 @@ int main(int argc, char * argv[]) { // IHUcpuTemp = (int)((cpuTemp * 10.0) + 0.5); } fclose(cpuTempSensor); - + } if (payload == ON) { // -55 STEMBoardFailure = 0; @@ -709,7 +709,7 @@ int main(int argc, char * argv[]) { payload = OFF; // turn off since STEM Payload is not responding } 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]) sensor_min[count1] = sensor[count1]; if (sensor[count1] > sensor_max[count1]) @@ -717,7 +717,7 @@ int main(int argc, char * argv[]) { // printf("Smin %f Smax %f \n", sensor_min[count1], sensor_max[count1]); } } - } +// } #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); @@ -1766,10 +1766,10 @@ void write_wave(int i, short int *buffer) else { 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); 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]); } // printf("%d %d \n", i, buffer[ctr - 1]); @@ -1815,7 +1815,7 @@ int test_i2c_bus(int bus) strcat (busDev, busS); printf("I2C Bus Tested: %s \n", busDev); - if (access(busDev, W_OK | R_OK) >= 0) { // Test if I2C Bus is present + if (access(busDev, W_OK | R_OK) >= 0) { // Test if I2C Bus is present // printf("bus is present\n\n"); char result[128]; const char command_start[] = "timeout 2 i2cdetect -y "; // was 5 10 @@ -1837,7 +1837,7 @@ int test_i2c_bus(int bus) if (bus == 3) printf("-> If this is a CubeSatSim Lite, then this error is normal!\n"); output = -1; - } + } } else { printf("ERROR: %s bus has a problem \n Check software to see if I2C enabled \n", busDev);