7
mirror of https://github.com/EEVengers/ThunderScope.git synced 2025-04-08 06:25:30 +00:00

Fixed bug

switching number of channels now checks that the trigger channel is
still active
This commit is contained in:
Alex Vandenberg 2021-03-22 17:53:48 -04:00
parent 1700612c9c
commit 075e6ea32c

View File

@ -548,6 +548,12 @@ void controller::setCh(int8_t newCh)
{
controllerPause();
// If the trigger channel will nolonger be active
if (getTriggerCh() + 1 > newCh){
// Set the trigger ch to ch 1
setTriggerCh(1);
}
triggerThread->setCh(newCh);
processorThread->setCh(newCh);
postProcessorThread->setCh(newCh);
@ -564,6 +570,7 @@ void controller::setCh(int8_t newCh)
* None
* Return:
* int8_t - current trigger channel as known by the trigger thread;
* This value is 0 - 3.
******************************************************************************/
int8_t controller::getTriggerCh()
{