code sanitizations
This commit is contained in:
		
							parent
							
								
									e7a5ab3ca6
								
							
						
					
					
						commit
						bac9540d52
					
				@ -82,7 +82,7 @@ private:
 | 
			
		||||
  uint8_t cursor;
 | 
			
		||||
 | 
			
		||||
#else
 | 
			
		||||
#error "No valid payload converter defined"
 | 
			
		||||
#error No valid payload converter defined!
 | 
			
		||||
#endif
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -9,7 +9,7 @@ https://www-user.tu-chemnitz.de/~heha/viewzip.cgi/hs/Funkuhr.zip/
 | 
			
		||||
#ifdef HAS_DCF77
 | 
			
		||||
 | 
			
		||||
#ifdef IF_482
 | 
			
		||||
#error "You must define at most one of IF482 or DCF77"
 | 
			
		||||
#error You must define at most one of IF482 or DCF77!
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "dcf77.h"
 | 
			
		||||
@ -50,9 +50,9 @@ int dcf77_init(void) {
 | 
			
		||||
 | 
			
		||||
  assert(ClockTask); // has clock task started?
 | 
			
		||||
 | 
			
		||||
  timepulse_init(PPS);              // setup pulse
 | 
			
		||||
  timepulse_init(PPS);        // setup pulse
 | 
			
		||||
  DCF_Out(sync_clock(now())); // sync DCF time on next second
 | 
			
		||||
  timepulse_start();                // start pulse
 | 
			
		||||
  timepulse_start();          // start pulse
 | 
			
		||||
 | 
			
		||||
  return 1; // success
 | 
			
		||||
} // ifdcf77_init
 | 
			
		||||
@ -140,9 +140,8 @@ void dcf77_loop(void *pvParameters) {
 | 
			
		||||
      vTaskDelayUntil(&wakeTime, pdMS_TO_TICKS(DCF77_PULSE_DURATION));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
#elif (PPS < DCF77_PULSE_DURATION) // we need downclocking
 | 
			
		||||
    vTaskDelayUntil(&wakeTime, pdMS_TO_TICKS(DCF77_PULSE_DURATION - PPS));
 | 
			
		||||
    DCF_Out(0);
 | 
			
		||||
#elif (PPS < DCF77_PULSE_DURATION) // we need downclocking, not yet implemented
 | 
			
		||||
#error Timepulse is too low for DCF77!
 | 
			
		||||
#endif
 | 
			
		||||
  } // for
 | 
			
		||||
} // dcf77_loop()
 | 
			
		||||
 | 
			
		||||
@ -80,7 +80,7 @@ not evaluated by model BU-190
 | 
			
		||||
#ifdef HAS_IF482
 | 
			
		||||
 | 
			
		||||
#ifdef HAS_DCF77
 | 
			
		||||
#error "You must define at most one of IF482 or DCF77"
 | 
			
		||||
#error You must define at most one of IF482 or DCF77!
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "if482.h"
 | 
			
		||||
@ -100,7 +100,6 @@ static const char TAG[] = "main";
 | 
			
		||||
#define PPS IF482_PULSE_DURATION
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
HardwareSerial IF482(2); // use UART #2 (note: #1 may be in use for serial GPS)
 | 
			
		||||
 | 
			
		||||
// initialize and configure IF482 Generator
 | 
			
		||||
@ -191,10 +190,8 @@ void if482_loop(void *pvParameters) {
 | 
			
		||||
      IF482.print(IF482_Out(now() + 1));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
#elif (PPS < IF482_PULSE_DURATION) // we need downclocking
 | 
			
		||||
    IF482.print(IF482_Out(now() + 1));
 | 
			
		||||
    vTaskDelayUntil(&wakeTime,
 | 
			
		||||
                    shotTime - PPS); // sets waketime to moment of shot
 | 
			
		||||
#elif (PPS < IF482_PULSE_DURATION) // we need downclocking, not yet implemented
 | 
			
		||||
#error Timepulse is too low for IF482!
 | 
			
		||||
#endif
 | 
			
		||||
  }
 | 
			
		||||
} // if482_loop()
 | 
			
		||||
 | 
			
		||||
@ -437,5 +437,5 @@ void PayloadConvert::addButton(uint8_t value) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#else
 | 
			
		||||
#error "No valid payload converter defined"
 | 
			
		||||
#error No valid payload converter defined!
 | 
			
		||||
#endif
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user