Skip to content

Commit 57d9418

Browse files
Merge pull request #298 from alanbjohnston/beta-test
bug fix FSK/BPSK sync loss
2 parents 4193a28 + f6a7764 commit 57d9418

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ int main(int argc, char * argv[]) {
643643
}
644644

645645
if (payload == ON) { // moved to here
646+
// if ((payload == ON) && (mode != BPSK)) { // moved to here
646647
STEMBoardFailure = 0;
647648
printf("get_payload_status: %d \n", get_payload_serial(FALSE)); // not debug
648649
fflush(stdout);
@@ -1393,7 +1394,8 @@ void get_tlm_fox() {
13931394
// while ((millis() - sampleTime) < (unsigned int)samplePeriod)
13941395
int startSleep = millis();
13951396
if ((millis() - sampleTime) < ((unsigned int)frameTime - 250)) // was 250 100 500 for FSK
1396-
sleep(2.0); // 0.5); // 25); // initial period
1397+
// sleep(2.0); // 0.5); // 25); // initial period
1398+
sleep(1.0); // 0.5); // 25); // initial period
13971399
while ((millis() - sampleTime) < ((unsigned int)frameTime - 250)) // was 250 100
13981400
sleep(0.1); // 25); // 0.5); // 25);
13991401
// sleep((unsigned int)sleepTime);

main.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ unsigned int sampleTime = 0;
134134
int frames_sent = 0;
135135
int cw_id = ON;
136136
int vB4 = FALSE, vB5 = FALSE, vB3 = FALSE, ax5043 = FALSE, transmit = FALSE, onLed, onLedOn, onLedOff, txLed, txLedOn, txLedOff, payload = OFF;
137-
float voltageThreshold = 3.6, batteryVoltage = 4.5, batteryCurrent = 0, currentThreshold = 100;
137+
// float voltageThreshold = 3.6, batteryVoltage = 4.5, batteryCurrent = 0, currentThreshold = 100;
138+
float voltageThreshold = 3.5, batteryVoltage = 4.5, batteryCurrent = 0, currentThreshold = 100;
138139
float latitude = 39.027702f, longitude = -77.078064f;
139140
float lat_file, long_file;
140141
double cpuTemp;
@@ -175,7 +176,7 @@ int start_flag_detected = FALSE;
175176
int start_flag_complete = FALSE;
176177
int end_flag_detected = FALSE;
177178
int jpeg_start = 0;
178-
#define CAMERA_TIMEOUT 10000 // 20000 // Camera timeout in milli seconds
179+
#define CAMERA_TIMEOUT 2000 // 10000 // 20000 // Payload timeout in milli seconds
179180

180181
void battery_saver(int setting);
181182
int battery_saver_check();

0 commit comments

Comments
 (0)