Commit f51b3243 authored by Ivan Tyagov's avatar Ivan Tyagov

Implement method for mode switch (normal).

parent 4cb31625
...@@ -36,5 +36,22 @@ void gotoSafeMode() { ...@@ -36,5 +36,22 @@ void gotoSafeMode() {
// do shutdown all attached I2C slaves (MOD-IO's relays). // do shutdown all attached I2C slaves (MOD-IO's relays).
safeShutdownI2CSlaveList(); safeShutdownI2CSlaveList();
// XXX: should process exit ? // set to virtual mode which means that coupler will mimic working but
// not set any related relays' state
I2C_VIRTUAL_MODE = 1;
}
void gotoNormalMode() {
/*
* In this mode coupler will set all
* relays of attached I2C slaves.
* This is the normal mode of operation (
* unless changed over CLI with "-m" switch.)
*/
UA_LOG_INFO(UA_Log_Stdout, \
UA_LOGCATEGORY_USERLAND, \
"Go to NORMAL MODE");
I2C_VIRTUAL_MODE = 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment