Skip to content

Commit

Permalink
minor cosmetic (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhu- authored Feb 8, 2025
1 parent d13f8de commit 4e2e15b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
31 changes: 16 additions & 15 deletions src/bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,15 +297,14 @@ void BusType::receive(uint8_t symbol, uint32_t startBitTime) {
_busState.microsSinceLastSyn());
}
}
push({false, RECEIVED, symbol, 0,
_client}); // send to everybody. ebusd needs the SYN to get in the
// right mood
// send to everybody. ebusd needs the SYN to get in the right mood
push({false, RECEIVED, symbol, 0, _client});
break;
case Arbitration::arbitrating:
DEBUG_LOG("BUS ARBITRATIN 0x%02x %lu us\n", symbol,
_busState.microsSinceLastSyn());
push({false, RECEIVED, symbol, _client,
_client}); // do not send to arbitration client
// do not send to arbitration client
push({false, RECEIVED, symbol, _client, _client});
break;
case Arbitration::won1:
_nbrWon1++;
Expand All @@ -316,10 +315,10 @@ void BusType::receive(uint8_t symbol, uint32_t startBitTime) {
arbitrationDone();
DEBUG_LOG("BUS SEND WON 0x%02x %lu us\n", _busState._master,
_busState.microsSinceLastSyn());
push({true, STARTED, _busState._master, _client,
_client}); // send only to the arbitrating client
push({false, RECEIVED, symbol, _client,
_client}); // do not send to arbitrating client
// send only to the arbitrating client
push({true, STARTED, _busState._master, _client, _client});
// do not send to arbitrating client
push({false, RECEIVED, symbol, _client, _client});
_client = 0;
break;
case Arbitration::lost1:
Expand All @@ -331,17 +330,19 @@ void BusType::receive(uint8_t symbol, uint32_t startBitTime) {
arbitrationDone();
DEBUG_LOG("BUS SEND LOST 0x%02x 0x%02x %lu us\n", _busState._master,
_busState._symbol, _busState.microsSinceLastSyn());
push({true, FAILED, _busState._master, _client,
_client}); // send only to the arbitrating client
push({false, RECEIVED, symbol, 0, _client}); // send to everybody
// send only to the arbitrating client
push({true, FAILED, _busState._master, _client, _client});
// send to everybody
push({false, RECEIVED, symbol, 0, _client});
_client = 0;
break;
case Arbitration::error:
_nbrErrors++;
arbitrationDone();
push({true, ERROR_EBUS, ERR_FRAMING, _client,
_client}); // send only to the arbitrating client
push({false, RECEIVED, symbol, 0, _client}); // send to everybody
// send only to the arbitrating client
push({true, ERROR_EBUS, ERR_FRAMING, _client, _client});
// send to everybody
push({false, RECEIVED, symbol, 0, _client});
_client = 0;
break;
}
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ IotWebConf iotWebConf(HOSTNAME, &dnsServer, &configServer, "", CONFIG_VERSION);
iotwebconf::ParameterGroup connGroup =
iotwebconf::ParameterGroup("conn", "Connection parameters");
iotwebconf::CheckboxParameter staticIPParam = iotwebconf::CheckboxParameter(
"Enable Static IP", "staticIPParam", staticIPValue, STRING_LEN);
"Static IP", "staticIPParam", staticIPValue, STRING_LEN);
iotwebconf::TextParameter ipAddressParam =
iotwebconf::TextParameter("IP address", "ipAddress", ipAddressValue,
STRING_LEN, "", DEFAULT_STATIC_IP);
Expand All @@ -78,7 +78,7 @@ iotwebconf::TextParameter netmaskParam =
STRING_LEN, DEFAULT_NETMASK, DEFAULT_NETMASK);

iotwebconf::ParameterGroup ebusGroup =
iotwebconf::ParameterGroup("ebus", "EBUS configuration");
iotwebconf::ParameterGroup("ebus", "eBUS configuration");
iotwebconf::NumberParameter pwmParam =
iotwebconf::NumberParameter("PWM value", "pwm_value", pwm_value, NUMBER_LEN,
"130", "1..255", "min='1' max='255' step='1'");
Expand Down

0 comments on commit 4e2e15b

Please sign in to comment.