-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathmain.cpp
More file actions
77 lines (60 loc) · 2.18 KB
/
main.cpp
File metadata and controls
77 lines (60 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
Copyright 2009-13 Stephan Martin, Dominik Gummel
This file is part of Multidisplay.
Multidisplay 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.
Multidisplay 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 Multidisplay. If not, see <http://www.gnu.org/licenses/>.
*/
#include <avr/wdt.h>
#include <Arduino.h>
#include "LCDController.h"
#include "MultidisplayController.h"
#include "SensorData.h"
#include "RPMBoostController.h"
/*
ToDo:
- (5) Throttle Calib
- (5) RPM Calib (there should be a real method, not just a factor...)
- (4) Setup Screen
- (5) Battery Meter
- (3) Make the Bignum Screen flexible for all Values
- Reserv Anain and a PWM Out for Wastegate controlling...
- (1) Change tge Typ K reading for the selection to work together with the MCP3208 Chip select !! be aware read_adc has some debug on the led´s going on!!!
*/
SensorData data;
#ifdef LCD
LCDController lcdController;
#endif
MultidisplayController mController;
#ifdef BOOSTN75
RPMBoostController boostController;
#endif
//doesnt work with DisplayTech 204A in 4Bit mode :(
//LiquidCrystal lcd(4,11, 2, 6,7,8,9);
LCD4Bit lcd(4);
int main(void) {
/* Must call init for arduino to work properly */
init();
data.myconstructor();
//#ifdef LCD
// lcdController.myconstructor();
//#endif
#ifdef BOOSTN75
boostController.myconstructor();
#endif
mController.myconstructor();
for (;;)
mController.mainLoop();
// we arent allowed to return from this main function!
}
//Gentoo Bug
//http://bugs.gentoo.org/show_bug.cgi?id=147155
//ln -s /usr/i686-pc-linux-gnu/avr/lib/ldscripts in Debug and Release dir!
//or -T /usr/lib/binutils/avr/2.19.1/ldscripts/avr5.x as linker option