14 #if( FMI_SUPPORT_A622 ) 30 ON_BN_CLICKED( IDOK, OnBnClickedSet )
31 ON_BN_CLICKED( IDCANCEL, OnClose )
39 CDashcamNtfctnDlg::CDashcamNtfctnDlg
44 : CDialog( CDashcamNtfctnDlg::IDD, aParent )
46 , mForwardCollisionNtfctn( -1 )
47 , mLaneDepartureNtfctn( -1 )
48 , mIncidentDetectionNtfctn( -1 )
68 CDialog::OnInitDialog();
80 CDataExchange * aDataExchange
83 CDialog::DoDataExchange( aDataExchange );
112 memset( &setNtfctn, 0,
sizeof( setNtfctn ) );
143 CDialog::PostNcDestroy();
154 switch( return_code )
158 message.Format( _T(
"Camera notification settings successfully updated." ) );
159 MessageBox( message, _T(
"Camera Notifications Success" ), MB_OK | MB_ICONINFORMATION );
164 message.Format( _T(
"Camera notifications failed.\n Forward Collision Warnings and Lane Departure Warnings not supported on this device." ) );
165 MessageBox( message, _T(
"Camera Notifications Failure" ), MB_OK | MB_ICONINFORMATION );
170 message.Format( _T(
"Camera notifications failed. Forward Collision Warning is not enabled on this device." ) );
171 MessageBox( message, _T(
"Camera Notifications Failure" ), MB_OK | MB_ICONINFORMATION );
176 message.Format( _T(
"Camera notifications failed. Lane Departure Warning is not enabled on this device." ) );
177 MessageBox( message, _T(
"Camera Notifications Failure" ), MB_OK | MB_ICONINFORMATION );
182 message.Format( _T(
"Camera notifications failed. Automatic Incident Detection is not enabled on this device." ) );
183 MessageBox( message, _T(
"Camera Notifications Failure" ), MB_OK | MB_ICONINFORMATION );
188 message.Format( _T(
"Camera notifications failed. Unrecognized error." ) );
189 MessageBox( message, _T(
"Camera Notifications Failure" ), MB_OK | MB_ICONINFORMATION );
204 switch( return_code )
214 message.Format( _T(
"Camera notification settings successfully retrieved." ) );
215 MessageBox( message, _T(
"Camera Notifications Success" ), MB_OK | MB_ICONINFORMATION );
220 message.Format( _T(
"Camera notification settings retrieval failed due to internal error." ) );
221 MessageBox( message, _T(
"Camera Notifications Failure" ), MB_OK | MB_ICONINFORMATION );
226 message.Format( _T(
"Camera notification settings retrieval failed. Unrecognized Reason." ) );
227 MessageBox( message, _T(
"Camera Notifications Failure" ), MB_OK | MB_ICONINFORMATION );
247 GetDlgItem( IDOK )->EnableWindow();
251 GetDlgItem( IDOK )->EnableWindow(
FALSE );
Data type for Get Dashcam Notification Settings Packet ID (0X1609) from client to server...
#define IDC_ENABLE_LANE_DEPARTURE_WARNING_NTFCTN
BOOL OnInitDialog()
Initialize the dialog.
virtual ~CDashcamNtfctnDlg()
Destructor.
boolean enable_incident_ntfctn
void OnClose()
Handler for the Close action.
Browser-based container for listing the Dashcam library.
void PostNcDestroy()
Called by MFC after the window has been destroyed; performs final termination activities.
afx_msg LRESULT OnGetNtfctnSettingsResponse(WPARAM, LPARAM)
This function handles the dashcam set notification receipt event from device.
void OnRefreshNtfctnSettings()
Button handler for the Retrieve Settings button.
virtual void DoDataExchange(CDataExchange *pDX)
Perform dialog data exchange and validation.
void sendFmiPacket(uint16 aFmiPacketId, uint8 *aFmiPayload, uint8 aFmiPayloadSize)
Send an arbitrary FMI packet.
boolean enable_lane_departure_ntfctn
boolean enable_incident_ntfctn
void OnReevaluate()
Change handler for editable controls.
Data type for Dashcam Get Settings Packet ID (0X1604, 0X1608) from server to client.
#define IDC_DISABLE_LANE_DEPARTURE_WARNING_NTFCTN
boolean enable_fcw_ntfctn
unsigned char boolean
8-bit value representing FALSE (0) or TRUE (nonzero)
int mIncidentDetectionNtfctn
void OnBnClickedSet()
Button handler for the Set button.
#define IDC_DISABLE_INCIDENT_DETECTION_NTFCTN
Serial communication controller for Garmin and FMI packets.
boolean enable_fcw_ntfctn
afx_msg LRESULT OnDashcamSetNtfctnReceipt(WPARAM, LPARAM)
This function handles the dashcam set notification receipt event from device.
#define IDC_ENABLE_FORWARD_COLLISION_NTFCTN
int mForwardCollisionNtfctn
unsigned char uint8
8-bit unsigned integer
FmiApplicationLayer & mCom
Reference to the FMI communication controller.
#define IDC_ENABLE_INCIDENT_DETECTION_NTFCTN
#define WM_EVENT(_event)
Translation from an application event to the corresponding Windows message.
boolean enable_lane_departure_ntfctn
#define IDC_DASHCAM_REFRESH_SETTINGS
Data type for Set Dashcam Notification Settings Packet ID (0X1606) from server to client...
#define IDC_DISABLE_FORWARD_COLLISION_NTFCTN