removed BPSK ns delay, R and r prints

pull/189/head
alanbjohnston 3 years ago committed by GitHub
parent 43e892aae6
commit 3a5a259bca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1358,10 +1358,13 @@ void write_wave(int i, byte *buffer)
if (ctr > bufLen) { if (ctr > bufLen) {
ctr = ctr - bufLen; ctr = ctr - bufLen;
// if (debug_mode) { // if (debug_mode) {
Serial.print("ctr reset "); // Serial.print("ctr reset ");
if (bufLen != 0) { if (bufLen != 0) {
Serial.print("RR Microseconds: "); float avg_time = (float)(micros() - micros3)/(float)bufLen;
Serial.println((float)(micros() - micros3)/(float)bufLen); if ((avg_time > (delay_time * 1.15)) || debug_mode) {
Serial.print("r Microseconds: ");
Serial.println(avg_time);
}
} }
// } // }
micros3 = micros(); micros3 = micros();
@ -3437,8 +3440,8 @@ bool TimerHandler0(struct repeating_timer *t) {
// Serial.print(wav_position); // Serial.print(wav_position);
// Serial.print(" "); // Serial.print(" ");
while ((micros() - micro_timer2) < delay_time) { } while ((micros() - micro_timer2) < delay_time) { }
if (mode == BPSK) // if (mode == BPSK)
busy_wait_at_least_cycles(51); // 300 ns // busy_wait_at_least_cycles(51); // 300 ns
// if ((micros() - micro_timer2) > 834) // if ((micros() - micro_timer2) > 834)
// Serial.println(micros() - micro_timer2); // Serial.println(micros() - micro_timer2);
micro_timer2 = micros(); micro_timer2 = micros();
@ -3464,11 +3467,20 @@ bool TimerHandler0(struct repeating_timer *t) {
// Serial.println(millis()); // Serial.println(millis());
/**/ /**/
// if ((micros() - micro_timer)/bufLen > (delay_time + 10)) { // if ((micros() - micro_timer)/bufLen > (delay_time + 10)) {
/*
if (bufLen != 0) { if (bufLen != 0) {
Serial.print("R Microseconds: "); Serial.print("R Microseconds: ");
Serial.println((float)(micros() - micro_timer)/(float)bufLen); Serial.println((float)(micros() - micro_timer)/(float)bufLen);
} }
// } // }
*/
if (bufLen != 0) {
float avg_time = (float)(micros() - micro_timer)/(float)bufLen;
if ((avg_time > (delay_time * 1.15)) || debug_mode) {
Serial.print("R Microseconds: ");
Serial.println(avg_time);
}
}
micro_timer = micros(); micro_timer = micros();
/**/ /**/
} else { } else {

Loading…
Cancel
Save

Powered by TurnKey Linux.