mirror of
https://github.com/Oleg-Stepanenko-owo/IEBUS
synced 2025-06-22 07:16:13 +00:00
added freeze after Honda/GVN display swithcing
This commit is contained in:
parent
baf4818bcf
commit
d9e0f0bd9d
@ -50,8 +50,10 @@ void AVCLanHonda::begin()
|
||||
bHondaDisLast = false;
|
||||
bShowRearCam = false;
|
||||
bFirstStart_20 = true;
|
||||
bFreeze = false;
|
||||
|
||||
setWaitTime( 0L );
|
||||
freezeTime = 0L;
|
||||
|
||||
// timer1 setup, prescaler factor - 1024
|
||||
TCCR1A = 0; // normal mode
|
||||
@ -112,9 +114,12 @@ void AVCLanHonda::processAction( AvcActionID ActionID )
|
||||
case ACT_DISP_OFF:
|
||||
if ( !bShowRearCam )
|
||||
{
|
||||
// need freeze on 2000 sec after code receiving.
|
||||
bShowHondaDisp = false;
|
||||
bHondaDisLast = false;
|
||||
setWaitTime(0L);
|
||||
bFreeze = true;
|
||||
freezeTime = (millis() + FREEZE_TIME);
|
||||
}
|
||||
break;
|
||||
case ACT_CAM_OFF:
|
||||
|
@ -30,7 +30,7 @@
|
||||
#define AVCLANDEVICE_VERSION "0.1.0"
|
||||
|
||||
#define BUTT_WAIT 1000
|
||||
#define LOCK_TIME 700
|
||||
#define FREEZE_TIME 1500
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
typedef enum {
|
||||
@ -74,14 +74,17 @@ class AVCLanHonda
|
||||
void checkLock();
|
||||
void setHondaDis( bool val );
|
||||
|
||||
bool bFreeze;
|
||||
bool bFirstStart_20;
|
||||
|
||||
unsigned long freezeTime;
|
||||
|
||||
private:
|
||||
unsigned long waitTime;
|
||||
// unsigned long lockTime;
|
||||
|
||||
|
||||
bool bWait;
|
||||
bool bLock;
|
||||
|
||||
|
||||
bool bShowRearCam;
|
||||
bool bShowHondaDisp;
|
||||
|
@ -33,6 +33,13 @@ void loop()
|
||||
avclanHonda.setHondaDis( false ); //Show GVN screen
|
||||
}
|
||||
|
||||
if ( avclanHonda.bFreeze ) {
|
||||
if ( avclanHonda.freezeTime < millis() ) {
|
||||
avclanHonda.bFreeze = false;
|
||||
avclanHonda.freezeTime = 0L;
|
||||
} else return;
|
||||
}
|
||||
|
||||
if ( INPUT_IS_SET ) {
|
||||
byte res = avclan.readMessage();
|
||||
if ( !res ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user