mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-24 13:21:23 +01:00
Change configuration, rename FireBox
This commit is contained in:
parent
2e5e071fbb
commit
0bfeefca37
29
include/Config.h
Normal file
29
include/Config.h
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* Config.h
|
||||||
|
*
|
||||||
|
* This file is part of CommandStation-DCC.
|
||||||
|
*
|
||||||
|
* CommandStation-DCC is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* CommandStation-DCC is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with CommandStation-DCC. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COMMANDSTATION_DCC_CONFIG
|
||||||
|
#define COMMANDSTATION_DCC_CONFIG
|
||||||
|
|
||||||
|
// Choose the motor shield that you want to use.
|
||||||
|
|
||||||
|
#define CONFIG_WSM_FIREBOX
|
||||||
|
//#define CONFIG_ARDUINO_MOTOR_SHIELD
|
||||||
|
//#define CONFIG_POLOLU_MOTOR_SHIELD
|
||||||
|
|
||||||
|
#endif
|
41
src/main.cpp
41
src/main.cpp
@ -1,24 +1,41 @@
|
|||||||
|
/*
|
||||||
|
* main.cpp
|
||||||
|
*
|
||||||
|
* This file is part of CommandStation-DCC.
|
||||||
|
*
|
||||||
|
* CommandStation-DCC is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* CommandStation-DCC is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with CommandStation-DCC. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <CommandStation.h>
|
#include <CommandStation.h>
|
||||||
#include <ArduinoTimers.h>
|
#include <ArduinoTimers.h>
|
||||||
|
|
||||||
|
#include "Config.h"
|
||||||
|
|
||||||
const uint8_t kIRQmicros = 29;
|
const uint8_t kIRQmicros = 29;
|
||||||
const uint8_t kNumLocos = 50;
|
const uint8_t kNumLocos = 50;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
#if defined CONFIG_WSM_FIREBOX
|
||||||
// Motor driver selection:
|
DCCMain* mainTrack = DCCMain::Create_WSM_FireBox_Main(kNumLocos);
|
||||||
// Comment out all but the two lines that you want to use
|
DCCService* progTrack = DCCService::Create_WSM_FireBox_Prog();
|
||||||
|
#elif defined CONFIG_ARDUINO_MOTOR_SHIELD
|
||||||
// DCCMain* mainTrack = DCCMain::Create_WSM_SAMCommandStation_Main(kNumLocos);
|
DCCMain* mainTrack = DCCMain::Create_Arduino_L298Shield_Main(kNumLocos);
|
||||||
// DCCService* progTrack = DCCService::Create_WSM_SAMCommandStation_Prog();
|
DCCService* progTrack = DCCService::Create_Arduino_L298Shield_Prog();
|
||||||
|
#elif defined CONFIG_POLOLU_MOTOR_SHIELD
|
||||||
// DCCMain* mainTrack = DCCMain::Create_Arduino_L298Shield_Main(kNumLocos);
|
|
||||||
// DCCService* progTrack = DCCService::Create_Arduino_L298Shield_Prog();
|
|
||||||
|
|
||||||
DCCMain* mainTrack = DCCMain::Create_Pololu_MC33926Shield_Main(kNumLocos);
|
DCCMain* mainTrack = DCCMain::Create_Pololu_MC33926Shield_Main(kNumLocos);
|
||||||
DCCService* progTrack = DCCService::Create_Pololu_MC33926Shield_Prog();
|
DCCService* progTrack = DCCService::Create_Pololu_MC33926Shield_Prog();
|
||||||
|
#endif
|
||||||
////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void waveform_IrqHandler() {
|
void waveform_IrqHandler() {
|
||||||
mainTrack->interruptHandler();
|
mainTrack->interruptHandler();
|
||||||
|
Loading…
Reference in New Issue
Block a user