mirror of
https://github.com/Oleg-Stepanenko-owo/IEBUS
synced 2025-06-25 00:36:13 +00:00
update error chacking
This commit is contained in:
parent
76036cfb4d
commit
5e1905e4ad
@ -7,22 +7,6 @@
|
|||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
//const AvcInMessageTable mtSearchHead[] PROGMEM = {
|
|
||||||
// { ACT_BUTTON_UP, 0x08, 0x05, {0x59, 0x0D, 0x31, 0x02, 0x01}, 0x03, {0x21, 0x01, 0xBE}}, // Button press
|
|
||||||
// { ACT_B_DISPOFF, 0x08, 0x05, {0x59, 0x0D, 0x31, 0x02, 0x01}, 0x03, {0x22, 0x71, 0x2F}},
|
|
||||||
// { ACT_B_DISPFULL, 0x08, 0x05, {0x59, 0x0D, 0x31, 0x02, 0x01}, 0x03, {0x20, 0x01, 0xBD}},
|
|
||||||
// { ACT_B_DISPHULF, 0x08, 0x05, {0x59, 0x0D, 0x31, 0x02, 0x01}, 0x03, {0x22, 0x11, 0xCF}},
|
|
||||||
// { ACT_CAM_ON, 0x09, 0x05, {0x59, 0x0D, 0x31, 0x02, 0x01}, 0x04, {0x94, 0x00, 0x00, 0x31}}, // Cam ON
|
|
||||||
// { ACT_CAM_OFF, 0x09, 0x05, {0x59, 0x0D, 0x31, 0x02, 0x01}, 0x04, {0x94, 0xFF, 0x00, 0x30}}, // Cam OFF
|
|
||||||
// { ACT_DISP_HULF, 0x09, 0x05, {0x59, 0x0D, 0x31, 0x02, 0x01}, 0x04, {0x91, 0x02, 0x00, 0x30}}, // display hulf color
|
|
||||||
// { ACT_DISP_OFF, 0x09, 0x05, {0x59, 0x0D, 0x31, 0x02, 0x01}, 0x04, {0x91, 0x00, 0x00, 0x2E}}, // display off
|
|
||||||
// { ACT_TEL, 0x0A, 0x06, {0x68, 0x02, 0x31, 0x02, 0x00, 0x00}, 0x01, {0x0C}}, // 0x13, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0xE3 }},
|
|
||||||
// { ACT_TEL_CANCEL, 0x0A, 0x06, {0x68, 0x02, 0x31, 0x02, 0x00, 0x00}, 0x01, {0x05}}, // 0x13, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0xDC }},
|
|
||||||
// { ACT_VOL, 0x0A, 0x06, {0x68, 0x02, 0x31, 0x02, 0x02, 0x00}, 0x00, {0x00}} //0x05 = 1
|
|
||||||
//
|
|
||||||
// // 10 680231020200 05 13000000001D0000DE - vol = 1
|
|
||||||
//};
|
|
||||||
|
|
||||||
//TODO: master -> 131
|
//TODO: master -> 131
|
||||||
// 09780D3103024B000009 - next track ?
|
// 09780D3103024B000009 - next track ?
|
||||||
// 08590D3102012212D0
|
// 08590D3102012212D0
|
||||||
|
@ -12,25 +12,22 @@
|
|||||||
#define HONDA_DIS_ON sbi(COMMUT_PORT, COMMUT_OUT);
|
#define HONDA_DIS_ON sbi(COMMUT_PORT, COMMUT_OUT);
|
||||||
#define HONDA_DIS_OFF cbi(COMMUT_PORT, COMMUT_OUT);
|
#define HONDA_DIS_OFF cbi(COMMUT_PORT, COMMUT_OUT);
|
||||||
|
|
||||||
static int MAX_ERROR_COUNT = 30;
|
|
||||||
byte errorID;
|
|
||||||
int error_count;
|
|
||||||
char BUFFF[15];
|
char BUFFF[15];
|
||||||
|
|
||||||
char buf[12]; //buffer to store AT commands
|
|
||||||
int len = 0; //stores the length of the commands
|
int len = 0; //stores the length of the commands
|
||||||
|
|
||||||
//------ Error time updating -----------------------------------------------------
|
//------ Error time updating -----------------------------------------------------
|
||||||
unsigned long waitErrorTime;
|
unsigned long waitErrorTime;
|
||||||
bool beforeErrorComute;
|
bool beforeErrorComute;
|
||||||
|
static int MAX_ERROR_COUNT = 10;
|
||||||
|
byte errorID;
|
||||||
|
int error_count;
|
||||||
|
|
||||||
#define ERROR_TIME 4000
|
#define ERROR_TIME 4000
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
void setup()
|
void setup()
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
HONDA_DIS_ON;
|
|
||||||
HONDA_DIS_ON;
|
|
||||||
HONDA_DIS_ON;
|
HONDA_DIS_ON;
|
||||||
LED_ON;
|
LED_ON;
|
||||||
|
|
||||||
@ -75,6 +72,7 @@ void loop()
|
|||||||
if ( !res )
|
if ( !res )
|
||||||
{
|
{
|
||||||
LED_OFF;
|
LED_OFF;
|
||||||
|
error_count = 0;
|
||||||
|
|
||||||
avclan.printMessage(true);
|
avclan.printMessage(true);
|
||||||
error_count = 0;
|
error_count = 0;
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
/*
|
#define IEBUS_VERSION "0.6"
|
||||||
config.h - AVCLan driver config
|
|
||||||
Created by Kochetkov Aleksey, 04.08.2010
|
|
||||||
*/
|
|
||||||
#define IEBUS_VERSION "0.5"
|
|
||||||
|
|
||||||
// type of AVCLan hardwire driver
|
// type of AVCLan hardwire driver
|
||||||
#define AVCLAN_PCA82C250
|
#define AVCLAN_PCA82C250
|
||||||
|
Loading…
x
Reference in New Issue
Block a user