7
mirror of https://github.com/EEVengers/ThunderScope.git synced 2025-04-22 17:43:44 +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 62f9dd9691
commit 18aac264fc

View File

@ -493,6 +493,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);
@ -509,6 +515,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()
{