diff --git a/control/bin/b15fcli b/control/bin/b15fcli
new file mode 100755
index 0000000..087f64b
Binary files /dev/null and b/control/bin/b15fcli differ
diff --git a/control/src/ui/ui.cpp b/control/src/ui/ui.cpp
index cb2198c..20c200e 100644
--- a/control/src/ui/ui.cpp
+++ b/control/src/ui/ui.cpp
@@ -9,8 +9,8 @@ void show_main(int)
ViewSelection* view = new ViewSelection();
view->setTitle("B15F - Command Line Interface");
view->addChoice("[ Monitor - Eingaben beobachten ]", &show_monitor);
- view->addChoice("[ Digitale Ausgabe BE0 ]", &show_digital_output0);
- view->addChoice("[ Digitale Ausgabe BE1 ]", &show_digital_output1);
+ view->addChoice("[ Digitale Ausgabe BA0 ]", &show_digital_output0);
+ view->addChoice("[ Digitale Ausgabe BA1 ]", &show_digital_output1);
view->addChoice("[ Analoge Ausgabe AA0 ]", &show_analog_output0);
view->addChoice("[ Analoge Ausgabe AA1 ]", &show_analog_output1);
view->addChoice("[ Selbsttest des B15 ]", &show_selftest_info);
@@ -72,7 +72,7 @@ void show_info(int)
{
ViewInfo* view = new ViewInfo();
view->setTitle("Info");
- view->setText("Informationen zu Board 15 Famulus Edition\nEs war einmal...");
+ view->setText("Informationen zu Board 15 Famulus Edition\n\nProjektseite: https://github.com/devfix/b15f\nDokumentation: https://devfix.github.io/b15f/");
view->setLabelClose("[ Zurueck ]");
view->repaint();
diff --git a/docs/html/annotated.html b/docs/html/annotated.html
index ef61f9a..387da83 100644
--- a/docs/html/annotated.html
+++ b/docs/html/annotated.html
@@ -85,7 +85,7 @@ $(function() {
diff --git a/docs/html/b15f_8cpp_source.html b/docs/html/b15f_8cpp_source.html
index acc8ea5..76eec8a 100644
--- a/docs/html/b15f_8cpp_source.html
+++ b/docs/html/b15f_8cpp_source.html
@@ -112,7 +112,7 @@ $(function() {
diff --git a/docs/html/b15f_8h_source.html b/docs/html/b15f_8h_source.html
index ddfc4a8..48202c5 100644
--- a/docs/html/b15f_8h_source.html
+++ b/docs/html/b15f_8h_source.html
@@ -107,7 +107,7 @@ $(function() {
diff --git a/docs/html/classB15F-members.html b/docs/html/classB15F-members.html
index 707c073..aa37c36 100644
--- a/docs/html/classB15F-members.html
+++ b/docs/html/classB15F-members.html
@@ -105,7 +105,7 @@ $(function() {
diff --git a/docs/html/classB15F.html b/docs/html/classB15F.html
index c87b9b8..9e4f638 100644
--- a/docs/html/classB15F.html
+++ b/docs/html/classB15F.html
@@ -1030,7 +1030,7 @@ constexpr static uint32_t
diff --git a/docs/html/classDot-members.html b/docs/html/classDot-members.html
index e3f377e..7cf97f6 100644
--- a/docs/html/classDot-members.html
+++ b/docs/html/classDot-members.html
@@ -76,7 +76,7 @@ $(function() {
diff --git a/docs/html/classDot.html b/docs/html/classDot.html
index 665c410..8126787 100644
--- a/docs/html/classDot.html
+++ b/docs/html/classDot.html
@@ -196,7 +196,7 @@ Public Member Functions |
diff --git a/docs/html/classDriverException-members.html b/docs/html/classDriverException-members.html
index e48c75b..d594cc8 100644
--- a/docs/html/classDriverException-members.html
+++ b/docs/html/classDriverException-members.html
@@ -77,7 +77,7 @@ $(function() {
diff --git a/docs/html/classDriverException.html b/docs/html/classDriverException.html
index faa3298..4072801 100644
--- a/docs/html/classDriverException.html
+++ b/docs/html/classDriverException.html
@@ -109,7 +109,7 @@ std::string msg_ | <
diff --git a/docs/html/classPlottyFile-members.html b/docs/html/classPlottyFile-members.html
index b50d376..1d54b66 100644
--- a/docs/html/classPlottyFile-members.html
+++ b/docs/html/classPlottyFile-members.html
@@ -100,7 +100,7 @@ $(function() {
diff --git a/docs/html/classPlottyFile.html b/docs/html/classPlottyFile.html
index d5a9bed..2a0f9be 100644
--- a/docs/html/classPlottyFile.html
+++ b/docs/html/classPlottyFile.html
@@ -811,7 +811,7 @@ Public Member Functions
diff --git a/docs/html/classTimeoutException-members.html b/docs/html/classTimeoutException-members.html
index 486fba4..de04aa5 100644
--- a/docs/html/classTimeoutException-members.html
+++ b/docs/html/classTimeoutException-members.html
@@ -77,7 +77,7 @@ $(function() {
diff --git a/docs/html/classTimeoutException.html b/docs/html/classTimeoutException.html
index da64976..fab27e7 100644
--- a/docs/html/classTimeoutException.html
+++ b/docs/html/classTimeoutException.html
@@ -239,7 +239,7 @@ std::string
diff --git a/docs/html/classUSART-members.html b/docs/html/classUSART-members.html
index 2fdb7ec..248e765 100644
--- a/docs/html/classUSART-members.html
+++ b/docs/html/classUSART-members.html
@@ -86,7 +86,7 @@ $(function() {
diff --git a/docs/html/classUSART.html b/docs/html/classUSART.html
index ec343a6..bce820a 100644
--- a/docs/html/classUSART.html
+++ b/docs/html/classUSART.html
@@ -523,7 +523,7 @@ Public Member Functions |
diff --git a/docs/html/classUSARTException-members.html b/docs/html/classUSARTException-members.html
index 83aab23..9f5d542 100644
--- a/docs/html/classUSARTException-members.html
+++ b/docs/html/classUSARTException-members.html
@@ -77,7 +77,7 @@ $(function() {
diff --git a/docs/html/classUSARTException.html b/docs/html/classUSARTException.html
index 67ce065..41904b4 100644
--- a/docs/html/classUSARTException.html
+++ b/docs/html/classUSARTException.html
@@ -239,7 +239,7 @@ std::string
diff --git a/docs/html/classView-members.html b/docs/html/classView-members.html
index 89b86d8..336f77c 100644
--- a/docs/html/classView-members.html
+++ b/docs/html/classView-members.html
@@ -89,7 +89,7 @@ $(function() {
diff --git a/docs/html/classView.html b/docs/html/classView.html
index 0bd3043..ef5d254 100644
--- a/docs/html/classView.html
+++ b/docs/html/classView.html
@@ -157,7 +157,7 @@ constexpr static int | KEY_E
diff --git a/docs/html/classViewInfo-members.html b/docs/html/classViewInfo-members.html
index 3958c69..b83441b 100644
--- a/docs/html/classViewInfo-members.html
+++ b/docs/html/classViewInfo-members.html
@@ -99,7 +99,7 @@ $(function() {
diff --git a/docs/html/classViewInfo.html b/docs/html/classViewInfo.html
index 31aa7a9..fac044c 100644
--- a/docs/html/classViewInfo.html
+++ b/docs/html/classViewInfo.html
@@ -185,7 +185,7 @@ static std::vector< std::string > |
diff --git a/docs/html/classViewMonitor-members.html b/docs/html/classViewMonitor-members.html
index 79d515d..e5fe1e7 100644
--- a/docs/html/classViewMonitor-members.html
+++ b/docs/html/classViewMonitor-members.html
@@ -103,7 +103,7 @@ $(function() {
diff --git a/docs/html/classViewMonitor.html b/docs/html/classViewMonitor.html
index 42d0600..99097d8 100644
--- a/docs/html/classViewMonitor.html
+++ b/docs/html/classViewMonitor.html
@@ -197,7 +197,7 @@ constexpr static int | KEY_E
diff --git a/docs/html/classViewPromt-members.html b/docs/html/classViewPromt-members.html
index 9482bc7..def03b3 100644
--- a/docs/html/classViewPromt-members.html
+++ b/docs/html/classViewPromt-members.html
@@ -105,7 +105,7 @@ $(function() {
diff --git a/docs/html/classViewPromt.html b/docs/html/classViewPromt.html
index b86d3ac..50ca352 100644
--- a/docs/html/classViewPromt.html
+++ b/docs/html/classViewPromt.html
@@ -205,7 +205,7 @@ static std::vector< std::string > |
diff --git a/docs/html/classViewSelection-members.html b/docs/html/classViewSelection-members.html
index 8a49b6c..27e4486 100644
--- a/docs/html/classViewSelection-members.html
+++ b/docs/html/classViewSelection-members.html
@@ -94,7 +94,7 @@ $(function() {
diff --git a/docs/html/classViewSelection.html b/docs/html/classViewSelection.html
index 87f91ff..0b4979c 100644
--- a/docs/html/classViewSelection.html
+++ b/docs/html/classViewSelection.html
@@ -172,7 +172,7 @@ static std::vector< std::string > |
diff --git a/docs/html/classes.html b/docs/html/classes.html
index 4c09ed9..8f38c2e 100644
--- a/docs/html/classes.html
+++ b/docs/html/classes.html
@@ -105,7 +105,7 @@ $(function() {
diff --git a/docs/html/cli_8cpp_source.html b/docs/html/cli_8cpp_source.html
index 7de037d..cef7d7a 100644
--- a/docs/html/cli_8cpp_source.html
+++ b/docs/html/cli_8cpp_source.html
@@ -72,7 +72,7 @@ $(function() {
static void setAbortHandler(errorhandler_t func)
diff --git a/docs/html/dir_1788f8309b1a812dcb800a185471cf6c.html b/docs/html/dir_1788f8309b1a812dcb800a185471cf6c.html
index c4bdf28..636c17f 100644
--- a/docs/html/dir_1788f8309b1a812dcb800a185471cf6c.html
+++ b/docs/html/dir_1788f8309b1a812dcb800a185471cf6c.html
@@ -73,7 +73,7 @@ $(function() {
diff --git a/docs/html/dir_587c94d866dbb2f408f78cf41f9b2f8d.html b/docs/html/dir_587c94d866dbb2f408f78cf41f9b2f8d.html
index 35b8999..3824bc3 100644
--- a/docs/html/dir_587c94d866dbb2f408f78cf41f9b2f8d.html
+++ b/docs/html/dir_587c94d866dbb2f408f78cf41f9b2f8d.html
@@ -73,7 +73,7 @@ $(function() {
diff --git a/docs/html/dot_8cpp_source.html b/docs/html/dot_8cpp_source.html
index 5d60273..96a57ea 100644
--- a/docs/html/dot_8cpp_source.html
+++ b/docs/html/dot_8cpp_source.html
@@ -77,7 +77,7 @@ $(function() {
Dot(uint16_t x, uint16_t y, uint8_t curve)
diff --git a/docs/html/dot_8h_source.html b/docs/html/dot_8h_source.html
index 467ed10..9582c63 100644
--- a/docs/html/dot_8h_source.html
+++ b/docs/html/dot_8h_source.html
@@ -78,7 +78,7 @@ $(function() {
Dot(uint16_t x, uint16_t y, uint8_t curve)
diff --git a/docs/html/driverexception_8h_source.html b/docs/html/driverexception_8h_source.html
index 4041155..74b206a 100644
--- a/docs/html/driverexception_8h_source.html
+++ b/docs/html/driverexception_8h_source.html
@@ -74,7 +74,7 @@ $(function() {
diff --git a/docs/html/files.html b/docs/html/files.html
index 8fd54c0..19524c8 100644
--- a/docs/html/files.html
+++ b/docs/html/files.html
@@ -99,7 +99,7 @@ $(function() {
diff --git a/docs/html/functions.html b/docs/html/functions.html
index b00da03..548560a 100644
--- a/docs/html/functions.html
+++ b/docs/html/functions.html
@@ -380,7 +380,7 @@ $(function() {
diff --git a/docs/html/functions_func.html b/docs/html/functions_func.html
index d6dfce2..1ed4263 100644
--- a/docs/html/functions_func.html
+++ b/docs/html/functions_func.html
@@ -347,7 +347,7 @@ $(function() {
diff --git a/docs/html/functions_vars.html b/docs/html/functions_vars.html
index cce82b5..5292535 100644
--- a/docs/html/functions_vars.html
+++ b/docs/html/functions_vars.html
@@ -92,7 +92,7 @@ $(function() {
diff --git a/docs/html/hierarchy.html b/docs/html/hierarchy.html
index 3c4318f..a7967b8 100644
--- a/docs/html/hierarchy.html
+++ b/docs/html/hierarchy.html
@@ -86,7 +86,7 @@ $(function() {
diff --git a/docs/html/index.html b/docs/html/index.html
index 445fe91..a323a12 100644
--- a/docs/html/index.html
+++ b/docs/html/index.html
@@ -157,7 +157,7 @@ Dabei gehören Punkte mit dem gleichen Index für curve (uint8_
diff --git a/docs/html/plottyfile_8cpp_source.html b/docs/html/plottyfile_8cpp_source.html
index 3d3dd70..80a365f 100644
--- a/docs/html/plottyfile_8cpp_source.html
+++ b/docs/html/plottyfile_8cpp_source.html
@@ -101,7 +101,7 @@ $(function() {
std::string getUnitX(void) const
diff --git a/docs/html/plottyfile_8h_source.html b/docs/html/plottyfile_8h_source.html
index 8503ca3..669fe5a 100644
--- a/docs/html/plottyfile_8h_source.html
+++ b/docs/html/plottyfile_8h_source.html
@@ -102,7 +102,7 @@ $(function() {
std::string getUnitX(void) const
diff --git a/docs/html/timeoutexception_8h_source.html b/docs/html/timeoutexception_8h_source.html
index 9330309..6e9084b 100644
--- a/docs/html/timeoutexception_8h_source.html
+++ b/docs/html/timeoutexception_8h_source.html
@@ -79,7 +79,7 @@ $(function() {
TimeoutException(const std::string &message)
diff --git a/docs/html/ui_8cpp_source.html b/docs/html/ui_8cpp_source.html
index d547bda..41d71b8 100644
--- a/docs/html/ui_8cpp_source.html
+++ b/docs/html/ui_8cpp_source.html
@@ -70,7 +70,7 @@ $(function() {
ui.cpp
- 2 #include "../drv/b15f.h" 4 std::vector<View*> win_stack; 10 view->setTitle( "B15F - Command Line Interface"); 11 view->addChoice( "[ Monitor - Eingaben beobachten ]", &show_monitor); 12 view->addChoice( "[ Digitale Ausgabe BE0 ]", &show_digital_output0); 13 view->addChoice( "[ Digitale Ausgabe BE1 ]", &show_digital_output1); 14 view->addChoice( "[ Analoge Ausgabe AA0 ]", &show_analog_output0); 15 view->addChoice( "[ Analoge Ausgabe AA1 ]", &show_analog_output1); 16 view->addChoice( "[ Selbsttest des B15 ]", &show_selftest_info); 17 view->addChoice( "[ Informationen ]", &show_info); 18 view->addChoice( "", nullptr); 19 view->addChoice( "[ Beenden ]", &finish); 22 win_stack.push_back(view); 32 key = wgetch(View::getWinContext()); 33 win_stack.back()->repaint(); 34 nextCall = win_stack.back()->keypress(key); 42 while(win_stack.size()); 49 delete win_stack.back(); 53 win_stack.back()->repaint(); 64 if(t_refresh.joinable()) 74 view->setTitle( "Info"); 75 view->setText( "Informationen zu Board 15 Famulus Edition\nEs war einmal..."); 76 view->setLabelClose( "[ Zurueck ]"); 79 win_stack.push_back(view); 83 void show_monitor( int) 86 view->setTitle( "Monitor"); 87 view->setText( "\nErfasse Messwerte..."); 88 view->setLabelClose( "[ Zurueck ]"); 91 win_stack.push_back(view); 95 void show_invalid_port_input( int) 98 view->setTitle( "Falsche Eingabe"); 99 view->setText( "Bitte geben Sie einen Wert aus dem Intervall [0, FF] an."); 100 view->setLabelClose( "[ Schliessen ]"); 103 win_stack.push_back(view); 107 void show_invalid_dac_input( int) 110 view->setTitle( "Falsche Eingabe"); 111 view->setText( "Bitte geben Sie einen Wert aus dem Intervall [0, 1023] an."); 112 view->setLabelClose( "[ Schliessen ]"); 115 win_stack.push_back(view); 119 void write_digital_output0( int) 123 int d = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput(), 0, 16); 125 throw std::invalid_argument( "bad value"); 126 uint8_t port = static_cast<uint8_t>(d); 132 catch(std::invalid_argument& ex) 134 show_invalid_port_input(0); 138 void write_digital_output1( int) 142 int d = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput(), 0, 16); 144 throw std::invalid_argument( "bad value"); 145 uint8_t port = static_cast<uint8_t>(d); 151 catch(std::invalid_argument& ex) 153 show_invalid_port_input(0); 157 void write_analog_output0( int) 161 uint16_t port = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput()); 163 throw std::invalid_argument( "bad value"); 169 catch(std::invalid_argument& ex) 171 show_invalid_dac_input(0); 175 void write_analog_output1( int) 179 uint16_t port = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput()); 181 throw std::invalid_argument( "bad value"); 187 catch(std::invalid_argument& ex) 189 show_invalid_dac_input(0); 193 void show_digital_output0( int) 196 view->setTitle( "Digitale Ausgabe BE0"); 197 view->setMessage( "\nAusgabe Port-Wert (hex): 0x"); 198 view->setCancel( "[ Zurueck ]", true); 199 view->setConfirm( "[ OK ]", &write_digital_output0); 202 win_stack.push_back(view); 206 void show_digital_output1( int) 209 view->setTitle( "Digitale Ausgabe BE1"); 210 view->setMessage( "\nAusgabe Port-Wert (hex): 0x"); 211 view->setCancel( "[ Zurueck ]", true); 212 view->setConfirm( "[ OK ]", &write_digital_output1); 215 win_stack.push_back(view); 219 void show_analog_output0( int) 222 view->setTitle( "Analoge Ausgabe AA0"); 223 view->setMessage( "\nAusgabe 10-Bit-Wert (0...1023): "); 224 view->setCancel( "[ Zurueck ]", true); 225 view->setConfirm( "[ OK ]", &write_analog_output0); 228 win_stack.push_back(view); 232 void show_analog_output1( int) 235 view->setTitle( "Analoge Ausgabe AA1"); 236 view->setMessage( "\nAusgabe 10-Bit-Wert (0...1023): "); 237 view->setCancel( "[ Zurueck ]", true); 238 view->setConfirm( "[ OK ]", &write_analog_output1); 241 win_stack.push_back(view); 245 void start_selftest( int) 251 view->setTitle( "Selbsttest aktiv"); 252 view->setText( "Das B15 befindet sich jetzt im Selbsttestmodus.\n \nSelbsttest:\nZu Beginn geht der Reihe nach jede LED von BA0 bis BA1 an.\nDanach leuchten die LEDs an AA0 und AA1 kurz auf.\nZum Schluss spiegelt in einer Endlosschleife:\n* BA0 Port BE0\n* BA1 die DIP-Schalter S7\n* AA0 ADC0\n* AA1 ADC1"); 253 view->setLabelClose( "[ Selbsttest Beenden ]"); 254 view->setCall(&stop_selftest); 257 win_stack.push_back(view); 261 void stop_selftest( int) 271 void show_selftest_info( int) 274 view->setTitle( "Selbsttest"); 275 view->setText( "Bitte entfernen Sie jetzt alle Draehte von den Anschlussklemmen und bestaetigen\nmit Enter."); 276 view->setLabelClose( "[ Weiter ]"); 277 view->setCall(&start_selftest); 280 win_stack.push_back(view);
+ 2 #include "../drv/b15f.h" 4 std::vector<View*> win_stack; 10 view->setTitle( "B15F - Command Line Interface"); 11 view->addChoice( "[ Monitor - Eingaben beobachten ]", &show_monitor); 12 view->addChoice( "[ Digitale Ausgabe BA0 ]", &show_digital_output0); 13 view->addChoice( "[ Digitale Ausgabe BA1 ]", &show_digital_output1); 14 view->addChoice( "[ Analoge Ausgabe AA0 ]", &show_analog_output0); 15 view->addChoice( "[ Analoge Ausgabe AA1 ]", &show_analog_output1); 16 view->addChoice( "[ Selbsttest des B15 ]", &show_selftest_info); 17 view->addChoice( "[ Informationen ]", &show_info); 18 view->addChoice( "", nullptr); 19 view->addChoice( "[ Beenden ]", &finish); 22 win_stack.push_back(view); 32 key = wgetch(View::getWinContext()); 33 win_stack.back()->repaint(); 34 nextCall = win_stack.back()->keypress(key); 42 while(win_stack.size()); 49 delete win_stack.back(); 53 win_stack.back()->repaint(); 64 if(t_refresh.joinable()) 74 view->setTitle( "Info"); 75 view->setText( "Informationen zu Board 15 Famulus Edition\n\nProjektseite: https://github.com/devfix/b15f\nDokumentation: https://devfix.github.io/b15f/"); 76 view->setLabelClose( "[ Zurueck ]"); 79 win_stack.push_back(view); 83 void show_monitor( int) 86 view->setTitle( "Monitor"); 87 view->setText( "\nErfasse Messwerte..."); 88 view->setLabelClose( "[ Zurueck ]"); 91 win_stack.push_back(view); 95 void show_invalid_port_input( int) 98 view->setTitle( "Falsche Eingabe"); 99 view->setText( "Bitte geben Sie einen Wert aus dem Intervall [0, FF] an."); 100 view->setLabelClose( "[ Schliessen ]"); 103 win_stack.push_back(view); 107 void show_invalid_dac_input( int) 110 view->setTitle( "Falsche Eingabe"); 111 view->setText( "Bitte geben Sie einen Wert aus dem Intervall [0, 1023] an."); 112 view->setLabelClose( "[ Schliessen ]"); 115 win_stack.push_back(view); 119 void write_digital_output0( int) 123 int d = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput(), 0, 16); 125 throw std::invalid_argument( "bad value"); 126 uint8_t port = static_cast<uint8_t>(d); 132 catch(std::invalid_argument& ex) 134 show_invalid_port_input(0); 138 void write_digital_output1( int) 142 int d = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput(), 0, 16); 144 throw std::invalid_argument( "bad value"); 145 uint8_t port = static_cast<uint8_t>(d); 151 catch(std::invalid_argument& ex) 153 show_invalid_port_input(0); 157 void write_analog_output0( int) 161 uint16_t port = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput()); 163 throw std::invalid_argument( "bad value"); 169 catch(std::invalid_argument& ex) 171 show_invalid_dac_input(0); 175 void write_analog_output1( int) 179 uint16_t port = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput()); 181 throw std::invalid_argument( "bad value"); 187 catch(std::invalid_argument& ex) 189 show_invalid_dac_input(0); 193 void show_digital_output0( int) 196 view->setTitle( "Digitale Ausgabe BE0"); 197 view->setMessage( "\nAusgabe Port-Wert (hex): 0x"); 198 view->setCancel( "[ Zurueck ]", true); 199 view->setConfirm( "[ OK ]", &write_digital_output0); 202 win_stack.push_back(view); 206 void show_digital_output1( int) 209 view->setTitle( "Digitale Ausgabe BE1"); 210 view->setMessage( "\nAusgabe Port-Wert (hex): 0x"); 211 view->setCancel( "[ Zurueck ]", true); 212 view->setConfirm( "[ OK ]", &write_digital_output1); 215 win_stack.push_back(view); 219 void show_analog_output0( int) 222 view->setTitle( "Analoge Ausgabe AA0"); 223 view->setMessage( "\nAusgabe 10-Bit-Wert (0...1023): "); 224 view->setCancel( "[ Zurueck ]", true); 225 view->setConfirm( "[ OK ]", &write_analog_output0); 228 win_stack.push_back(view); 232 void show_analog_output1( int) 235 view->setTitle( "Analoge Ausgabe AA1"); 236 view->setMessage( "\nAusgabe 10-Bit-Wert (0...1023): "); 237 view->setCancel( "[ Zurueck ]", true); 238 view->setConfirm( "[ OK ]", &write_analog_output1); 241 win_stack.push_back(view); 245 void start_selftest( int) 251 view->setTitle( "Selbsttest aktiv"); 252 view->setText( "Das B15 befindet sich jetzt im Selbsttestmodus.\n \nSelbsttest:\nZu Beginn geht der Reihe nach jede LED von BA0 bis BA1 an.\nDanach leuchten die LEDs an AA0 und AA1 kurz auf.\nZum Schluss spiegelt in einer Endlosschleife:\n* BA0 Port BE0\n* BA1 die DIP-Schalter S7\n* AA0 ADC0\n* AA1 ADC1"); 253 view->setLabelClose( "[ Selbsttest Beenden ]"); 254 view->setCall(&stop_selftest); 257 win_stack.push_back(view); 261 void stop_selftest( int) 271 void show_selftest_info( int) 274 view->setTitle( "Selbsttest"); 275 view->setText( "Bitte entfernen Sie jetzt alle Draehte von den Anschlussklemmen und bestaetigen\nmit Enter."); 276 view->setLabelClose( "[ Weiter ]"); 277 view->setCall(&start_selftest); 280 win_stack.push_back(view);
void delay_ms(uint16_t ms)
@@ -88,7 +88,7 @@ $(function() {
bool analogWrite0(uint16_t port)
diff --git a/docs/html/ui_8h_source.html b/docs/html/ui_8h_source.html
index 5524084..fb22202 100644
--- a/docs/html/ui_8h_source.html
+++ b/docs/html/ui_8h_source.html
@@ -73,7 +73,7 @@ $(function() {
5 #include "view_selection.h" 7 #include "view_monitor.h" 8 #include "view_promt.h" 17 void show_monitor( int); 18 void show_invalid_port_input( int); 19 void show_invalid_dac_input( int); 20 void write_digital_output0( int); 21 void write_digital_output1( int); 22 void write_analog_output0( int); 23 void write_analog_output1( int); 24 void show_digital_output0( int); 25 void show_digital_output1( int); 26 void show_analog_output0( int); 27 void show_analog_output1( int); 30 void show_selftest_info( int); 31 void start_selftest( int); 32 void stop_selftest( int); 35 extern std::vector<View*> win_stack; 36 extern std::thread t_refresh;
diff --git a/docs/html/usart_8cpp_source.html b/docs/html/usart_8cpp_source.html
index 36fea6d..21eda1f 100644
--- a/docs/html/usart_8cpp_source.html
+++ b/docs/html/usart_8cpp_source.html
@@ -88,7 +88,7 @@ $(function() {
diff --git a/docs/html/usart_8h_source.html b/docs/html/usart_8h_source.html
index 0d1e5dd..e95dbf2 100644
--- a/docs/html/usart_8h_source.html
+++ b/docs/html/usart_8h_source.html
@@ -88,7 +88,7 @@ $(function() {
void flushOutputBuffer(void)
diff --git a/docs/html/usartexception_8h_source.html b/docs/html/usartexception_8h_source.html
index d3bd920..3cee09d 100644
--- a/docs/html/usartexception_8h_source.html
+++ b/docs/html/usartexception_8h_source.html
@@ -79,7 +79,7 @@ $(function() {
virtual ~USARTException()=default
diff --git a/docs/html/view_8cpp_source.html b/docs/html/view_8cpp_source.html
index a07b9bb..c06f7f4 100644
--- a/docs/html/view_8cpp_source.html
+++ b/docs/html/view_8cpp_source.html
@@ -74,7 +74,7 @@ $(function() {
static void abort(std::string msg)
diff --git a/docs/html/view_8h_source.html b/docs/html/view_8h_source.html
index 64a3147..f2eb6c5 100644
--- a/docs/html/view_8h_source.html
+++ b/docs/html/view_8h_source.html
@@ -74,7 +74,7 @@ $(function() {
diff --git a/docs/html/view__info_8cpp_source.html b/docs/html/view__info_8cpp_source.html
index 5711211..85d4c92 100644
--- a/docs/html/view__info_8cpp_source.html
+++ b/docs/html/view__info_8cpp_source.html
@@ -73,7 +73,7 @@ $(function() {
5 calls.push_back( nullptr); 8 void ViewInfo::setText(std::string text) 13 void ViewInfo::setLabelClose(std::string label) 15 this->label_close = label; 18 void ViewInfo::setCall(call_t call) 26 for(std::string line : str_split(text, "\n")) 27 mvwprintw(win, text_offset_y + li++, text_offset_x, "%s", line.c_str()); 29 close_offset_x = (width - label_close.length()) / 2; 30 close_offset_y = height - 2; 32 wattron(win, A_REVERSE); 33 mvwprintw(win, close_offset_y, close_offset_x, "%s", label_close.c_str()); 34 wattroff(win, A_REVERSE); 37 call_t ViewInfo::keypress( int& key) 46 if(getmouse(&event) == OK && event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED)) 48 size_t column = start_x + close_offset_x; 49 size_t row = start_y + close_offset_y; 50 size_t mouse_x = event.x, mouse_y = event.y; 51 if(mouse_y == row && mouse_x >= column && mouse_x < column + label_close.length())
diff --git a/docs/html/view__info_8h_source.html b/docs/html/view__info_8h_source.html
index cbfb6bd..96a8c1c 100644
--- a/docs/html/view__info_8h_source.html
+++ b/docs/html/view__info_8h_source.html
@@ -75,7 +75,7 @@ $(function() {
diff --git a/docs/html/view__monitor_8cpp_source.html b/docs/html/view__monitor_8cpp_source.html
index 5aa49a5..71e0b43 100644
--- a/docs/html/view__monitor_8cpp_source.html
+++ b/docs/html/view__monitor_8cpp_source.html
@@ -84,7 +84,7 @@ $(function() {
diff --git a/docs/html/view__monitor_8h_source.html b/docs/html/view__monitor_8h_source.html
index 843b24e..591a20e 100644
--- a/docs/html/view__monitor_8h_source.html
+++ b/docs/html/view__monitor_8h_source.html
@@ -75,7 +75,7 @@ $(function() {
diff --git a/docs/html/view__promt_8cpp_source.html b/docs/html/view__promt_8cpp_source.html
index 09580c1..e54df8e 100644
--- a/docs/html/view__promt_8cpp_source.html
+++ b/docs/html/view__promt_8cpp_source.html
@@ -73,7 +73,7 @@ $(function() {
1 #include "view_promt.h" 7 int li = text_offset_y; 9 for(std::string line : str_split(message + input, "\n")) 11 mvwprintw(win, ++li, text_offset_x, "%s", line.c_str()); 12 ci = line.length() + text_offset_x; 15 button_offset_x = (width - label_cancel.length() - sep.length() - label_confirm.length()) / 2; 16 button_offset_y = height - text_offset_y; 20 wattron(win, A_REVERSE); 21 mvwprintw(win, button_offset_y, button_offset_x, "%s", label_cancel.c_str()); 22 wattroff(win, A_REVERSE); 23 mvwprintw(win, button_offset_y, button_offset_x + label_cancel.length(), "%s", sep.c_str()); 24 mvwprintw(win, button_offset_y, button_offset_x + label_cancel.length() + sep.length(), "%s", label_confirm.c_str()); 28 mvwprintw(win, button_offset_y, button_offset_x, "%s", label_cancel.c_str()); 29 mvwprintw(win, button_offset_y, button_offset_x + label_cancel.length(), "%s", sep.c_str()); 30 wattron(win, A_REVERSE); 31 mvwprintw(win, button_offset_y, button_offset_x + label_cancel.length() + sep.length(), "%s", label_confirm.c_str()); 32 wattroff(win, A_REVERSE); 37 void ViewPromt::setMessage(std::string message) 39 this->message = message; 42 void ViewPromt::setConfirm(std::string name, std::function< void( int)> call) 48 void ViewPromt::setCancel(std::string name, bool cancelable) 51 this->cancelable = cancelable; 54 std::string ViewPromt::getInput() 59 std::function<void( int)> ViewPromt::keypress( int& key) 61 std::function<void( int)> ret = nullptr; 71 selection = (selection + 1 ) % 2; 78 if(getmouse(&event) == OK && event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED)) 80 size_t column_start = start_x + button_offset_x; 81 size_t row_start = start_y + button_offset_y; 82 size_t mouse_x = event.x, mouse_y = event.y; 83 if(mouse_y == row_start) 85 if(cancelable && mouse_x >= column_start && mouse_x < column_start + label_cancel.length()) 87 if(selection == 0 || event.bstate & BUTTON1_DOUBLE_CLICKED) 91 if(mouse_x >= column_start + label_cancel.length() + sep.length() && mouse_x < column_start + label_cancel.length() + sep.length() + label_confirm.length()) 93 if(selection == 1 || event.bstate & BUTTON1_DOUBLE_CLICKED) 115 if(key >= ' ' && key <= '~')
diff --git a/docs/html/view__promt_8h_source.html b/docs/html/view__promt_8h_source.html
index bb95b07..564ebb3 100644
--- a/docs/html/view__promt_8h_source.html
+++ b/docs/html/view__promt_8h_source.html
@@ -75,7 +75,7 @@ $(function() {
diff --git a/docs/html/view__selection_8cpp_source.html b/docs/html/view__selection_8cpp_source.html
index a3b32a2..af204f4 100644
--- a/docs/html/view__selection_8cpp_source.html
+++ b/docs/html/view__selection_8cpp_source.html
@@ -73,7 +73,7 @@ $(function() {
1 #include "view_selection.h" 3 void ViewSelection::draw() 6 for( size_t i = 0; i < choices.size(); i++) 9 wattron(win, A_REVERSE); 10 mvwprintw(win, i + choice_offset_y, choice_offset_x, "%s", choices[i].c_str()); 12 wattroff(win, A_REVERSE); 16 void ViewSelection::addChoice(std::string name, call_t call) 18 choices.push_back(name); 19 calls.push_back(call); 22 call_t ViewSelection::keypress( int& key) 29 selection = (selection - 1 + choices.size()) % choices.size(); 30 while(!choices[selection].length() && choices.size()); 36 selection = (selection + 1) % choices.size(); 37 while(!choices[selection].length() && choices.size()); 45 if(getmouse(&event) == OK && event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED)) 47 size_t column_start = start_x + choice_offset_x; 48 size_t row_start = start_y + choice_offset_y; 49 size_t mouse_x = event.x, mouse_y = event.y; 50 for( size_t i = 0; i < choices.size(); i++) 51 if(choices[i].length() && mouse_y == row_start + i && mouse_x >= column_start && mouse_x < column_start + choices[i].length()) 53 if(selection == i || event.bstate & BUTTON1_DOUBLE_CLICKED) 66 if(selection == choices.size() - 1) 69 ret = calls[selection];
diff --git a/docs/html/view__selection_8h_source.html b/docs/html/view__selection_8h_source.html
index d15317b..7bbdd47 100644
--- a/docs/html/view__selection_8h_source.html
+++ b/docs/html/view__selection_8h_source.html
@@ -75,7 +75,7 @@ $(function() {
diff --git a/firmware/.getMCU.swp b/firmware/.getMCU.swp
new file mode 100644
index 0000000..4a59443
Binary files /dev/null and b/firmware/.getMCU.swp differ
diff --git a/firmware/Makefile b/firmware/Makefile
index b4a8479..e36fd5d 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -17,12 +17,13 @@ OBJCOPY_PATH = avr-objcopy
# Optionen
PROGRAMMER = avrispmkII
OUTPUT = b15f.elf
-HEX = b15f.hex
-MCU = atmega1284p
+HEX = b15f.hex
+MCU = atmega1284
CFLAGS = -Wall -Wextra -std=c++14 -O3 -mmcu=$(MCU) -DF_CPU=$(F_CPU) $(DEBUG)
LDFLAGS =
OBJECTS = main.o spi.o mcp23s17.o tlc5615.o adu.o selftest.o global_vars.o usart.o requests.o interrupts.o pwm.o
+
COMPILE = $(COMPILER_PATH) $(CFLAGS)
FUSES = (E:$(EFUSE), H:$(HFUSE), L:$(LFUSE))
diff --git a/firmware/getMCU b/firmware/getMCU
new file mode 100755
index 0000000..d9c3eb2
--- /dev/null
+++ b/firmware/getMCU
@@ -0,0 +1 @@
+avrdude -c "$1" -Pusb -p m16 2>&1 | grep 'Device signature =' | awk -F 'probably ' '{print $2}' | head -c-2
|