We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 02008a8 commit eb8b5eaCopy full SHA for eb8b5ea
1 file changed
Multiprotocol/JJRC345_nrf24l01.ino
@@ -37,18 +37,14 @@ enum JJRC345_FLAGS {
37
static uint8_t __attribute__((unused)) JJRC345_convert_channel(uint8_t num)
38
{
39
uint8_t val=convert_channel_8b(num);
40
- // 7F..01=left, 00=center, 80..FF=right
41
- if(val==0x80)
42
- val=0; // 0
43
- else
44
- if(val>0x80)
45
- val--; // 80..FE
46
47
- {
48
- val=0x80-val; // 80..01
49
50
- val--; // 7F..01
51
- }
+ // Should be 70..60..41..01, 80 center, 81..C1..E0..F0
+ // Trying 7F..01, 80 center, 81..FF
+ if(val<0x80)
+ {
+ val=0x80-val; // 80..01
+ if(val==0x80)
+ val--; // 7F..01
+ }
52
return val;
53
}
54
0 commit comments