Skip to content

Commit

Permalink
final comment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arfrie22 committed Jul 18, 2024
1 parent fdefc97 commit 3dc1c1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions OpenSprinkler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ unsigned char OpenSprinkler::iopts[] = {
100,// this and next byte define flow pulse rate (100x)
0, // default is 1.00 (100)
0, // set as remote extension
8, // this and the next three byte define the custom dns server ip
8, // this and the next three bytes define the custom dns server ip
8,
8,
8,
Expand Down Expand Up @@ -429,7 +429,7 @@ bool detect_i2c(int addr) {
bool OpenSprinkler::load_hardware_mac(unsigned char* buffer, bool wired) {
#if defined(ESP8266)
WiFi.macAddress((unsigned char*)buffer);
// if requesting wired Ethernet MAC, flip the last unsigned char to create a modified MAC
// if requesting wired Ethernet MAC, flip the last byte to create a modified MAC
if(wired) buffer[5] = ~buffer[5];
return true;
#else
Expand Down
4 changes: 2 additions & 2 deletions utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,14 +424,14 @@ ulong water_time_resolve(uint16_t v) {
}

// encode a 16-bit signed water time (-600 to 600)
// to unsigned unsigned char (0 to 240)
// to unsigned byte (0 to 240)
unsigned char water_time_encode_signed(int16_t i) {
i=(i>600)?600:i;
i=(i<-600)?-600:i;
return (i+600)/5;
}

// decode a 8-bit unsigned unsigned char (0 to 240)
// decode a 8-bit unsigned byte (0 to 240)
// to a 16-bit signed water time (-600 to 600)
int16_t water_time_decode_signed(unsigned char i) {
i=(i>240)?240:i;
Expand Down

0 comments on commit 3dc1c1b

Please sign in to comment.