new file: .gitignore new file: .vscode/extensions.json new file: ErsterTest.code-workspace new file: include/README new file: lib/AnalogFiveButtons/AnalogFiveButtons.cpp new file: lib/AnalogFiveButtons/AnalogFiveButtons.h new file: lib/Imotor/Imotor.cpp new file: lib/Imotor/Imotor.h new file: lib/L298n/L298n.cpp new file: lib/L298n/L298n.h new file: lib/README new file: lib/fahrt/fahrt.cpp new file: lib/fahrt/fahrt.h new file: lib/gleis/gleis.cpp new file: lib/gleis/gleis.h new file: lib/gleisabschnitt/gleisabschnitt.cpp new file: lib/gleisabschnitt/gleisabschnitt.h new file: lib/locomotive/locomotive.cpp new file: lib/locomotive/locomotive.h new file: lib/motor/dfquad.h new file: lib/motor/motor.cpp new file: lib/motor/motor.h new file: lib/weiche/weiche.cpp new file: lib/weiche/weiche.h new file: platformio.ini new file: src/main.cpp new file: test/README
		
			
				
	
	
		
			15 lines
		
	
	
		
			343 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			343 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include <gleis.h>
 | |
| #define CALL_MEMBER_FN(object,ptrToMember)  ((object).*(ptrToMember))
 | |
| 
 | |
| 
 | |
| Gleis::Gleis(Weiche weiche, Weiche::WeicheSchalten weicheSchalten): _weiche (weiche), _weicheSchalten(weicheSchalten)
 | |
| {
 | |
|     _keineWeiche = false;
 | |
| } 
 | |
| 
 | |
| void Gleis::Waehlen()
 | |
| {
 | |
|     if (!_keineWeiche)
 | |
|         CALL_MEMBER_FN(_weiche, _weicheSchalten)(); 
 | |
| }
 |