fix reversed mute and selection relais numbering
This commit is contained in:
parent
8d57a293d9
commit
0848ec82f2
|
@ -231,7 +231,7 @@ void setup() {
|
||||||
void reconnect() {
|
void reconnect() {
|
||||||
// Loop until reconnected
|
// Loop until reconnected
|
||||||
if (!mqttClient.connected()) {
|
if (!mqttClient.connected()) {
|
||||||
Serial.print("Connect MQTT ..");
|
Serial.print("MQTT ..");
|
||||||
// Attempt to connect
|
// Attempt to connect
|
||||||
if (mqttClient.connect(CLIENT_ID)) {
|
if (mqttClient.connect(CLIENT_ID)) {
|
||||||
Serial.println("connected");
|
Serial.println("connected");
|
||||||
|
@ -574,7 +574,7 @@ void loop() {
|
||||||
void callback(char* topic, byte* payload, unsigned int length) {
|
void callback(char* topic, byte* payload, unsigned int length) {
|
||||||
payload[length] = '\0'; //add end of string character
|
payload[length] = '\0'; //add end of string character
|
||||||
String spayload = String((char*)payload);
|
String spayload = String((char*)payload);
|
||||||
Serial.print("Message arrived:");
|
Serial.print("msg:");
|
||||||
Serial.print(topic);
|
Serial.print(topic);
|
||||||
for (unsigned int i = 0; i < length; i++) {
|
for (unsigned int i = 0; i < length; i++) {
|
||||||
Serial.print((char)payload[i]);
|
Serial.print((char)payload[i]);
|
||||||
|
@ -643,15 +643,14 @@ void srWrite(uint8_t pbit, boolean state){ //change bit to state
|
||||||
}
|
}
|
||||||
void srShiftOut(){
|
void srShiftOut(){
|
||||||
digitalWrite(SRLATCH, LOW);
|
digitalWrite(SRLATCH, LOW);
|
||||||
shiftOut(SRDATA, SRCLOCK, MSBFIRST, srbits>>8);
|
shiftOut(SRDATA, SRCLOCK, LSBFIRST, srbits>>8);
|
||||||
shiftOut(SRDATA, SRCLOCK, MSBFIRST, srbits);
|
shiftOut(SRDATA, SRCLOCK, LSBFIRST, srbits);
|
||||||
digitalWrite(SRLATCH, HIGH);
|
digitalWrite(SRLATCH, HIGH);
|
||||||
}
|
}
|
||||||
boolean srRead(uint8_t pbit){ //get state at bit
|
boolean srRead(uint8_t pbit){ //get state at bit
|
||||||
return (srbits >> pbit) & 1U;
|
return (srbits >> pbit) & 1U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32_t Wheel(byte WheelPos) {
|
uint32_t Wheel(byte WheelPos) {
|
||||||
WheelPos = 255 - WheelPos;
|
WheelPos = 255 - WheelPos;
|
||||||
if(WheelPos < 85) {
|
if(WheelPos < 85) {
|
||||||
|
|
Loading…
Reference in New Issue