15 #if( FMI_SUPPORT_A622 ) 48 ON_BN_CLICKED( IDOK, OnBnClickedSet )
50 ON_BN_CLICKED( IDCANCEL, OnClose )
52 ON_BN_CLICKED( IDC_DASHCAM_SEND_SELECT_ALL, OnReevaluate )
71 CDashcamDlg::CDashcamDlg
76 : CDialog( CDashcamDlg::IDD, aParent )
80 , mForwardCollision( -1 )
81 , mCollisionSensitivity( -1 )
82 , mLaneDeparture( -1 )
83 , mRecordOnStartup( -1 )
84 , mIncidentDetection( -1 )
86 , mDataOverlayDateTime( -1 )
87 , mDataOverlayLocationSpeed( -1 )
88 , mVideoResolution( -1 )
89 , mRecordAfterPowerLoss( -1 )
91 , mSendCollisionWarning( FALSE )
92 , mSendCollisionSensitivity( FALSE )
93 , mSendLaneDeparture( FALSE )
94 , mSendRecordOnStartup( FALSE )
95 , mSendIncidentDetection( FALSE )
96 , mSendRecordAudio( FALSE )
97 , mSendDataOverlayDateTime( FALSE )
98 , mSendDataOverlayLocationSpeed( FALSE )
99 , mSendVideoResolution( FALSE )
100 , mSendRecordAfterPowerLoss( FALSE )
120 CDialog::OnInitDialog();
132 CDataExchange * aDataExchange
135 CDialog::DoDataExchange( aDataExchange );
170 memset( &message, 0,
sizeof( message ) );
204 memset( &setConfig, 0,
sizeof( setConfig ) );
356 CDialog::PostNcDestroy();
368 message.Format( _T(
"Camera settings successfully locked/unlocked" ) );
369 MessageBox( message, _T(
"Camera Settings Success" ), MB_OK | MB_ICONINFORMATION );
387 message.Format( _T(
"Camera settings configuration successfully updated." ) );
388 MessageBox( message, _T(
"Camera Settings Success" ), MB_OK | MB_ICONINFORMATION );
406 message.Format( _T(
"Camera settings successfully updated." ) );
407 MessageBox( message, _T(
"Refresh Settings Success" ), MB_OK | MB_ICONINFORMATION );
498 GetDlgItem( IDOK )->EnableWindow();
502 GetDlgItem( IDOK )->EnableWindow(
FALSE );
529 switch( return_code )
533 message.Format( _T(
"Camera settings failure due to Power Loss Settings out of range." ) );
534 MessageBox( message, _T(
"Camera Settings Failure" ), MB_OK | MB_ICONINFORMATION );
539 message.Format( _T(
"Camera settings failure due to recorder resolution out of range." ) );
540 MessageBox( message, _T(
"Camera Settings Failure" ), MB_OK | MB_ICONINFORMATION );
545 message.Format( _T(
"Camera settings failure due to forward collision warning sensitivity out of range." ) );
546 MessageBox( message, _T(
"Camera Settings Failure" ), MB_OK | MB_ICONINFORMATION );
551 message.Format( _T(
"Camera settings failure due to setting ID out of range." ) );
552 MessageBox( message, _T(
"Camera Settings Failure" ), MB_OK | MB_ICONINFORMATION );
557 message.Format( _T(
"Camera settings failure." ) );
558 MessageBox( message, _T(
"Camera Settings Failure" ), MB_OK | MB_ICONINFORMATION );
#define IDC_HIGH_VIDEO_RESOLUTION
#define IDC_DASHCAM_SEND_LANE_DEPARTURE
virtual ~CDashcamDlg()
Destructor.
BOOL OnInitDialog()
Initialize the dialog.
#define IDC_DASHCAM_SEND_RECORD_ON_STARTUP
#define IDC_DISABLE_LANE_DEPARTURE_WARNING
#define IDC_ENABLE_FORWARD_COLLISION
BOOL mSendDataOverlayLocationSpeed
BOOL mSendCollisionSensitivity
#define IDC_DASHCAM_SEND_INCIDENT_DETECTION
void OnBnClickedSelectAll()
Handler for the select all check.
#define IDC_ENABLE_RECORD_ON_STARTUP
#define IDC_LOCK_ASSIST_SETTINGS
#define IDC_ENABLE_RECORD_AUDIO
FmiApplicationLayer & mCom
Reference to the FMI communication controller.
#define IDC_LOCK_DASHCAM_SETTINGS
void OnReevaluate()
Change handler for editable controls.
#define IDC_MEDIUM_VIDEO_RESOLUTION
#define IDC_UNLOCK_ASSIST_SETTINGS
void sendFmiPacket(uint16 aFmiPacketId, uint8 *aFmiPayload, uint8 aFmiPayloadSize)
Send an arbitrary FMI packet.
#define IDC_ENABLE_DATA_OVERLAY_DATE_TIME
Data type for Dashcam Lock Settings Packet ID (0X1600) from server to client.
Data type for Dashcam Get Settings Packet ID (0X1604, 0X1608) from server to client.
BOOL mSendRecordOnStartup
#define IDC_DASHCAM_SEND_DATA_OVERLAY_LOCATION_SPEED
#define IDC_DASHCAM_SET_LOCK
#define IDC_DISABLE_FORWARD_COLLISION
Browser-based container for listing the Dashcam library.
unsigned char boolean
8-bit value representing FALSE (0) or TRUE (nonzero)
#define IDC_FWD_COLLISION_SENSITIVITY
#define IDC_DISABLE_DATA_OVERLAY_LOCATION_SPEED
void PostNcDestroy()
Called by MFC after the window has been destroyed; performs final termination activities.
BOOL mSendVideoResolution
int mCollisionSensitivity
#define IDC_DISABLE_INCIDENT_DETECTION
void OnBnClickedSetLock()
Button handler for the Set Lock button pressed.
#define IDC_ENABLE_DATA_OVERLAY_LOCATION_SPEED
void OnRefreshSettings()
Button handler for the Refresh Settings button.
Data type for Dashcam Get Settings Packet ID (0X1605) from client to server.
BOOL mSendIncidentDetection
Serial communication controller for Garmin and FMI packets.
#define IDC_ENABLE_INCIDENT_DETECTION
#define IDC_RECORD_AFTER_POWER_LOSS
#define IDC_DISABLE_RECORD_AUDIO
#define IDC_ENABLE_LANE_DEPARTURE_WARNING
#define IDC_DASHCAM_SEND_RECORD_AFTER_POWER_LOSS
BOOL mSendDataOverlayDateTime
#define IDC_DISABLE_DATA_OVERLAY_DATE_TIME
void OnClose()
Handler for the Close action.
#define IDC_UNLOCK_DASHCAM_SETTINGS
__packed struct fmi_dashcam_settings_list settings_list[30]
BOOL mSendRecordAfterPowerLoss
void OnBnClickedSet()
Button handler for the Set button.
#define IDC_DASHCAM_SEND_SELECT_ALL
#define IDC_DASHCAM_SEND_COLLISION_WARNING
Data type for Dashcam Configure Settings Packet ID (0X1602) from server to client.
unsigned char uint8
8-bit unsigned integer
afx_msg LRESULT OnDashcamGetSettingsResponse(WPARAM, LPARAM)
This function handles dashcam get settings receipt event from device.
time_type UTIL_get_current_garmin_time()
Get the current server time in Garmin format.
void OnReevaluateLock()
Change handler for editable controls.
BOOL mSendCollisionWarning
#define WM_EVENT(_event)
Translation from an application event to the corresponding Windows message.
afx_msg LRESULT OnDashcamConfigReceipt(WPARAM, LPARAM)
This function handles the dashcam set configuration receipt event from device.
afx_msg LRESULT OnDashcamLockReceipt(WPARAM, LPARAM)
This function handles the dashcam lock/unlock receipt event from device.
#define IDC_DASHCAM_SEND_VIDEO_RESOLUTION
int mDataOverlayLocationSpeed
#define IDC_DASHCAM_SEND_DATA_OVERLAY_DATE_TIME
#define IDC_DASHCAM_REFRESH_SETTINGS
__packed struct fmi_dashcam_settings_list settings_list[30]
#define IDC_DASHCAM_SEND_COLLISION_SENSITIVITY
time_type origination_time
int mRecordAfterPowerLoss
#define IDC_DISABLE_RECORD_ON_STARTUP
#define IDC_DASHCAM_SEND_RECORD_AUDIO
virtual void DoDataExchange(CDataExchange *pDX)
Perform dialog data exchange and validation.