diff --git a/Desktop_Interface/desktop_settings.h b/Desktop_Interface/desktop_settings.h index 8a82fcc5..1c34ec5e 100644 --- a/Desktop_Interface/desktop_settings.h +++ b/Desktop_Interface/desktop_settings.h @@ -2,6 +2,7 @@ #define DESKTOP_SETTINGS_H #include +#include //Just a whole lot of variables not directly related to xmega. @@ -16,7 +17,7 @@ extern int TIMER_PERIOD; extern int ISO_RECOVERY_TIME; extern int MAX_WINDOW_SIZE; extern int TICK_SEPARATION; -#define TRIGGER_COUNT_THRESH (7 + log10(window)) //Is this the right number? +#define TRIGGER_COUNT_THRESH (7 + std::max(0, log10(window))) //Is this the right number? //Multimeter settings extern int MULTIMETER_PERIOD; diff --git a/Desktop_Interface/isodriver.cpp b/Desktop_Interface/isodriver.cpp index 9847b594..b0100a4d 100644 --- a/Desktop_Interface/isodriver.cpp +++ b/Desktop_Interface/isodriver.cpp @@ -778,7 +778,7 @@ void isoDriver::frameActionGeneric(char CH1_mode, char CH2_mode) //0 for off, 1 if((!paused_CH1) && triggerEnabled && (triggerWaiting == 0)){ triggerDelay = backLength - offset; triggerDelay /= (CH1_mode == -1) ? (VALID_DATA_PER_750 * 1000) : (VALID_DATA_PER_375*1000); - triggerDelay += delay; + //triggerDelay += delay; triggerWaiting = (triggerDelay<(window/2)) * 2; }