Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • e-24/public/ahoi/firmware
1 result
Show changes
Commits on Source (2)
BSD 3-Clause License BSD 3-Clause License
Copyright (c) 2019, smartport / public / ahoi Copyright (c) 2022, Hamburg University of Technology (TUHH).
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
......
...@@ -272,8 +272,9 @@ adda_activateSampling(void) ...@@ -272,8 +272,9 @@ adda_activateSampling(void)
spi_transmit((void *)&SPI_TX_ShdnSample); spi_transmit((void *)&SPI_TX_ShdnSample);
// wait remaining time // wait remaining time
if (adda_getTimerTicks() - start < TXRX_TURNAROUND_TICKS) { sample_time_t dt = adda_getTimerTicks() - start;
adda_wait(TXRX_TURNAROUND_TICKS - (adda_getTimerTicks() - start)); if (dt < TXRX_TURNAROUND_TICKS) {
adda_wait(TXRX_TURNAROUND_TICKS - dt);
} }
} else { } else {
txamp_disconnectOutput(); txamp_disconnectOutput();
...@@ -322,8 +323,9 @@ adda_activateTransmission() ...@@ -322,8 +323,9 @@ adda_activateTransmission()
txEnabled = true; txEnabled = true;
// wait remaining time // wait remaining time
if (adda_getTimerTicks() - start < RXTX_TURNAROUND_TICKS) { sample_time_t dt = adda_getTimerTicks() - start;
adda_wait(RXTX_TURNAROUND_TICKS - (adda_getTimerTicks() - start)); if (dt < RXTX_TURNAROUND_TICKS) {
adda_wait(RXTX_TURNAROUND_TICKS - dt);
} }
// connect hydrophone to TX circuitry (and disconnect RX) after // connect hydrophone to TX circuitry (and disconnect RX) after
......