fix reversed mute and selection relais numbering

This commit is contained in:
interfisch 2020-06-27 14:02:51 +02:00
parent 8d57a293d9
commit 0848ec82f2
1 changed files with 4 additions and 5 deletions

View File

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