Closed alexandergrib closed 4 years ago
Set HaveHardwareKnobs to false in instrument-panel.cpp and either comment out the #include
Did that, but getting lots of errors : `sudo bash make.sh <- command im using to build and output below
Building instrument-panel simvars.cpp: In member function ‘void simvars::loadSettings()’: simvars.cpp:132:99: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 41 and 296 [-Wformat-overflow=] 132 | ls.error, "Settings file group %s contains unknown attribute %s", group, name); | ^~ ~~~~
simvars.cpp:132:32: note: ‘sprintf’ output between 49 and 559 bytes into a destination of size 344
132 | sprintf(globals.error, "Settings file group %s contains unknown attribute %s", group, name);
| ~^~~~~~~~~~~~~~~~~~
simvars.cpp:119:99: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 41 and 296 [-Wformat-overflow=]
119 | ls.error, "Settings file group %s contains unknown attribute %s", group, name);
| ^~ ~~~~
simvars.cpp:119:32: note: ‘sprintf’ output between 49 and 559 bytes into a destination of size 344
119 | sprintf(globals.error, "Settings file group %s contains unknown attribute %s", group, name);
| ~^~~~~~~~~~~~~~~~~~
simvars.cpp: In member function ‘char simvars::view()’:
simvars.cpp:445:23: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-overflow=]
445 | sprintf(text, "%s %s: %.0f", varGroup[idx], varName[idx], varVal[idx]);
| ^~
simvars.cpp:445:12: note: ‘sprintf’ output between 5 and 824 bytes into a destination of size 256
445 | sprintf(text, "%s %s: %.0f", varGroup[idx], varName[idx], varVal[idx]);
| ~^~~~~~~~~~~~~
knobs.cpp: In constructor ‘knobs::knobs()’:
knobs.cpp:10:5: error: ‘wiringPiSetupGpio’ was not declared in this scope
10 | wiringPiSetupGpio();
| ^~~~~
knobs.cpp: In member function ‘int knobs::add(int, int, int, int, int)’:
knobs.cpp:45:20: error: ‘INPUT’ was not declared in this scope
45 | pinMode(gpio1, INPUT);
| ^~~~~
knobs.cpp:45:5: error: ‘pinMode’ was not declared in this scope
45 | pinMode(gpio1, INPUT);
| ^~~
knobs.cpp: In function ‘void watcher(knobs)’:
knobs.cpp:107:21: error: ‘digitalRead’ was not declared in this scope
107 | state = digitalRead(t->gpio[num][0]);
| ^~~
knobs.cpp:145:9: error: ‘delay’ was not declared in this scope
145 | delay(1);
| ^~~~~
`
Should build ok on Ubuntu but I've got no plans to do this myself as I prefer running it on a Raspberry Pi. Just work through each issue, they don't look too hard to solve.
I tried to build it on Ubuntu machine, but it keep asking me for wiring file.
Can you compile for Linux without switches?