Update cubesatsim.ino

pull/161/head
alanbjohnston 4 years ago committed by GitHub
parent 03630a9b49
commit 00c3848086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2365,19 +2365,21 @@ void setup1() {
void loop1() {
if (mode == FSK)
if (mode == FSK)
{
tx_bit = (buffer[wav_position] > 0) ? HIGH: LOW;
digitalWrite(AUDIO_OUT_PIN, tx_bit);
} else if (mode == BPSK) {
}
else if (mode == BPSK) {
tx_bit = (buffer[wav_position] > 0) ? true: false;
pwm_config_set_output_polarity( &config, tx_bit, tx_bit);
pwm_init(bpsk_pin_slice, &config, true);
pwm_set_gpio_level(BPSK_PWM_PIN, (config.top + 1) * 0.5);
}
// if (wav_position++ > BUFFER_SIZE) { // 300) {
// wav_position = wav_position - BUFFER_SIZE;
if (wav_position++ > bufLen) { // 300) {
@ -2386,8 +2388,8 @@ void loop1() {
Serial.print(" ");
Serial.println(millis());
}
// delay(5); //2 1);
sleep(delay_ms_time);
delay(1); //2 1);
// sleep(delay_ms_time);
// check pushbutton
// int pb_value;

Loading…
Cancel
Save

Powered by TurnKey Linux.