mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 21:01:25 +01:00
Reduce locomotives when compiling for UNO
This commit is contained in:
parent
872ed372df
commit
4033b6a597
14
src/main.cpp
14
src/main.cpp
@ -4,17 +4,23 @@
|
||||
|
||||
#define DCC_IRQ_MICROSECONDS 29
|
||||
|
||||
#if defined(ARDUINO_AVR_UNO)
|
||||
#define NUM_LOCOS_MAIN 20
|
||||
#else
|
||||
#define NUM_LOCOS_MAIN 50
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Motor driver selection:
|
||||
// Comment out all but the two lines that you want to use
|
||||
|
||||
// DCC* mainTrack = DCC::Create_WSM_SAMCommandStation_Main(50);
|
||||
// DCC* mainTrack = DCC::Create_WSM_SAMCommandStation_Main(NUM_LOCOS_MAIN);
|
||||
// DCC* progTrack = DCC::Create_WSM_SAMCommandStation_Prog(2);
|
||||
|
||||
DCC* mainTrack = DCC::Create_Arduino_L298Shield_Main(50);
|
||||
DCC* mainTrack = DCC::Create_Arduino_L298Shield_Main(NUM_LOCOS_MAIN);
|
||||
DCC* progTrack = DCC::Create_Arduino_L298Shield_Prog(2);
|
||||
|
||||
// DCC* mainTrack = DCC::Create_Pololu_MC33926Shield_Main(50);
|
||||
// DCC* mainTrack = DCC::Create_Pololu_MC33926Shield_Main(NUM_LOCOS_MAIN);
|
||||
// DCC* progTrack = DCC::Create_Pololu_MC33926Shield_Prog(2);
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
@ -34,7 +40,7 @@ void SERCOM4_Handler()
|
||||
void setup() {
|
||||
mainTrack->hdw.setup();
|
||||
progTrack->hdw.setup();
|
||||
|
||||
|
||||
// TimerA is TCC0 on SAMD21, Timer1 on MEGA2560, and Timer1 on MEGA328
|
||||
// We will fire an interrupt every 29us to generate the signal on the track
|
||||
TimerA.initialize();
|
||||
|
Loading…
Reference in New Issue
Block a user