Skip to content

Commit

Permalink
Merge pull request #298 from alanbjohnston/beta-test
Browse files Browse the repository at this point in the history
bug fix FSK/BPSK sync loss
  • Loading branch information
alanbjohnston authored Jan 23, 2024
2 parents 4193a28 + f6a7764 commit 57d9418
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ int main(int argc, char * argv[]) {
}

if (payload == ON) { // moved to here
// if ((payload == ON) && (mode != BPSK)) { // moved to here
STEMBoardFailure = 0;
printf("get_payload_status: %d \n", get_payload_serial(FALSE)); // not debug
fflush(stdout);
Expand Down Expand Up @@ -1393,7 +1394,8 @@ void get_tlm_fox() {
// while ((millis() - sampleTime) < (unsigned int)samplePeriod)
int startSleep = millis();
if ((millis() - sampleTime) < ((unsigned int)frameTime - 250)) // was 250 100 500 for FSK
sleep(2.0); // 0.5); // 25); // initial period
// sleep(2.0); // 0.5); // 25); // initial period
sleep(1.0); // 0.5); // 25); // initial period
while ((millis() - sampleTime) < ((unsigned int)frameTime - 250)) // was 250 100
sleep(0.1); // 25); // 0.5); // 25);
// sleep((unsigned int)sleepTime);
Expand Down
5 changes: 3 additions & 2 deletions main.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ unsigned int sampleTime = 0;
int frames_sent = 0;
int cw_id = ON;
int vB4 = FALSE, vB5 = FALSE, vB3 = FALSE, ax5043 = FALSE, transmit = FALSE, onLed, onLedOn, onLedOff, txLed, txLedOn, txLedOff, payload = OFF;
float voltageThreshold = 3.6, batteryVoltage = 4.5, batteryCurrent = 0, currentThreshold = 100;
// float voltageThreshold = 3.6, batteryVoltage = 4.5, batteryCurrent = 0, currentThreshold = 100;
float voltageThreshold = 3.5, batteryVoltage = 4.5, batteryCurrent = 0, currentThreshold = 100;
float latitude = 39.027702f, longitude = -77.078064f;
float lat_file, long_file;
double cpuTemp;
Expand Down Expand Up @@ -175,7 +176,7 @@ int start_flag_detected = FALSE;
int start_flag_complete = FALSE;
int end_flag_detected = FALSE;
int jpeg_start = 0;
#define CAMERA_TIMEOUT 10000 // 20000 // Camera timeout in milli seconds
#define CAMERA_TIMEOUT 2000 // 10000 // 20000 // Payload timeout in milli seconds

void battery_saver(int setting);
int battery_saver_check();
Expand Down

0 comments on commit 57d9418

Please sign in to comment.