Skip to content

Commit

Permalink
Fix T330 MakePayload return value on error
Browse files Browse the repository at this point in the history
  • Loading branch information
hhvrc committed Jan 22, 2025
1 parent 5c8b915 commit 7313c3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/radio/rmt/T330Encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ uint64_t Rmt::T330Encoder::MakePayload(uint16_t shockerId, uint8_t channel, Shoc
intensity = 0; // The remote always sends 0, I don't know what happens if you send something else.
break;
default:
return false; // Invalid type
return 0; // Invalid type
}

uint8_t channelVal = 0; // CH1 is 0b0000 and CH2 is 0b1110 on my remote but other values probably work.
Expand All @@ -43,7 +43,7 @@ uint64_t Rmt::T330Encoder::MakePayload(uint16_t shockerId, uint8_t channel, Shoc
channelVal = 0b1110;
break;
default:
return false; // Invalid channel
return 0; // Invalid channel
}

// Intensity must be between 0 and 100
Expand Down

0 comments on commit 7313c3a

Please # to comment.