1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-22 23:56:13 +01:00

remove not needed goto and volatile

This commit is contained in:
Harald Barth 2022-05-15 01:38:28 +02:00
parent c245c27f5d
commit 7fc5c48efa

View File

@ -226,17 +226,15 @@ const bool DCCWaveform::signalTransform[]={
/* WAVE_PENDING (should not happen) -> */ LOW};
void DCCWaveform::railcom2() {
volatile bool cutout;
bool cutout;
if (remainingPreambles==(requiredPreambles-2)) {
cutout=true;
goto doit;
}
else if (remainingPreambles==(requiredPreambles-6)) {
} else if (remainingPreambles==(requiredPreambles-6)) {
cutout=false;
goto doit;
} else {
return; // neiter start or end of cutout, do nothing
}
return; // neiter start or end of cutout, do nothing
doit:
if (isMainTrack) {
if (progTrackSyncMain) // we are main track and synced so we take care of prog track as well
progTrack.motorDriver->setRailcomCutout(cutout);