From 19f879da7f49dbfb383b43dd184dd76509554219 Mon Sep 17 00:00:00 2001 From: Pascal Langer Date: Thu, 7 Dec 2017 17:28:01 +0100 Subject: [PATCH] Failsafe --- Multiprotocol/Multiprotocol.h | 7 ++++--- Multiprotocol/Telemetry.ino | 3 +++ Multiprotocol/_Config.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index 7bb721d..0178b51 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -676,9 +676,10 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p -- [2] Flags 0x01 = Input signal detected 0x02 = Serial mode enabled - 0x04 = protocol is valid - 0x08 = module is in binding mode - 0x10 = module waits a bind event to load the protocol + 0x04 = Protocol is valid + 0x08 = Module is in binding mode + 0x10 = Module waits a bind event to load the protocol + 0x20 = Failsafe supported by currently running protocol [3] major [4] minor [5] revision diff --git a/Multiprotocol/Telemetry.ino b/Multiprotocol/Telemetry.ino index 087fbea..f83f591 100644 --- a/Multiprotocol/Telemetry.ino +++ b/Multiprotocol/Telemetry.ino @@ -109,6 +109,9 @@ static void multi_send_status() else if (!IS_BIND_DONE_on) flags |= 0x08; + //Failsafe supported + if((protocol==MODE_HISKY && sub_protocol==HK310) || protocol==MODE_DEVO || protocol==MODE_SFHSS || protocol==MODE_WK2x01 || protocol==MODE_AFHDS2A) //|| protocol==MODE_FRSKYX) + flags |= 0x20; } Serial_write(flags); diff --git a/Multiprotocol/_Config.h b/Multiprotocol/_Config.h index 1899a94..ba7ef83 100644 --- a/Multiprotocol/_Config.h +++ b/Multiprotocol/_Config.h @@ -159,7 +159,7 @@ /*** FAILSAFE SETTINGS ***/ /**************************/ //The module is using the same default failsafe values for all protocols which currently supports it: -// Devo, SFHSS and AFHDS2A +// Devo, WK2x01, SFHSS, HISKY/HK310 and AFHDS2A //All channels are centered except throttle which is forced low. //If you want to diasble failsafe globally comment the line below using "//". #define FAILSAFE_ENABLE