summaryrefslogtreecommitdiffstats
path: root/positioning/server/src/Sensor/VehicleSens_Did_LocationAltitude_g.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'positioning/server/src/Sensor/VehicleSens_Did_LocationAltitude_g.cpp')
-rw-r--r--positioning/server/src/Sensor/VehicleSens_Did_LocationAltitude_g.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/positioning/server/src/Sensor/VehicleSens_Did_LocationAltitude_g.cpp b/positioning/server/src/Sensor/VehicleSens_Did_LocationAltitude_g.cpp
index 64e37454..cae429c1 100644
--- a/positioning/server/src/Sensor/VehicleSens_Did_LocationAltitude_g.cpp
+++ b/positioning/server/src/Sensor/VehicleSens_Did_LocationAltitude_g.cpp
@@ -1,5 +1,5 @@
/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,20 +37,20 @@ static VEHICLESENS_DATA_MASTER gstLocationAltitude_g; // NOLINT(readability
@retval none
*******************************************************************************/
void VehicleSensInitLocationAltitudeG(void) {
-// SENSORLOCATION_ALTITUDEINFO_DAT st_altitude;
+ SENSORLOCATION_ALTITUDEINFO_DAT st_altitude;
memset(&gstLocationAltitude_g, 0x00, sizeof(VEHICLESENS_DATA_MASTER));
/** Data ID setting */
gstLocationAltitude_g.ul_did = VEHICLE_DID_LOCATION_ALTITUDE;
/** Data size setting */
-// gstLocationAltitude_g.us_size = sizeof(SENSORLOCATION_ALTITUDEINFO_DAT);
+ gstLocationAltitude_g.us_size = sizeof(SENSORLOCATION_ALTITUDEINFO_DAT);
/** Data content setting */
-// memset(&st_altitude, 0x00, sizeof(st_altitude));
-// st_altitude.getMethod = SENSOR_GET_METHOD_GPS;
-// st_altitude.SyncCnt = 0x00;
-// st_altitude.isEnable = SENSORLOCATION_STATUS_DISABLE;
-// memcpy(&gstLocationAltitude_g.uc_data[0], &st_altitude, sizeof(st_altitude));
+ memset(&st_altitude, 0x00, sizeof(st_altitude));
+ st_altitude.getMethod = SENSOR_GET_METHOD_GPS;
+ st_altitude.SyncCnt = 0x00;
+ st_altitude.isEnable = SENSORLOCATION_STATUS_DISABLE;
+ memcpy(&gstLocationAltitude_g.uc_data[0], &st_altitude, sizeof(st_altitude));
}
/****************************************************************************
@@ -64,24 +64,24 @@ void VehicleSensInitLocationAltitudeG(void) {
@retval VEHICLESENS_EQ : No data change
@retval VEHICLESENS_NEQ : Data change
*******************************************************************************/
-//u_int8 VehicleSensSetLocationAltitudeG(const SENSORLOCATION_ALTITUDEINFO_DAT *pst_altitude) {
-// u_int8 uc_ret;
-// VEHICLESENS_DATA_MASTER *pst_master;
-//
-// pst_master = &gstLocationAltitude_g;
-//
-// /** With the contents of the current data master,Compare received data */
-// uc_ret = VehicleSensmemcmp(pst_master->uc_data, pst_altitude, sizeof(SENSORLOCATION_ALTITUDEINFO_DAT));
-//
-// /** Received data is set in the data master. */
-// pst_master->ul_did = VEHICLE_DID_LOCATION_ALTITUDE;
-// pst_master->us_size = sizeof(SENSORLOCATION_ALTITUDEINFO_DAT);
-// pst_master->uc_rcvflag = VEHICLE_RCVFLAG_ON;
-// memset(pst_master->uc_data, 0x00, sizeof(pst_master->uc_data));
-// memcpy(pst_master->uc_data, pst_altitude, sizeof(SENSORLOCATION_ALTITUDEINFO_DAT));
-//
-// return(uc_ret);
-//}
+u_int8 VehicleSensSetLocationAltitudeG(const SENSORLOCATION_ALTITUDEINFO_DAT *pst_altitude) {
+ u_int8 uc_ret;
+ VEHICLESENS_DATA_MASTER *pst_master;
+
+ pst_master = &gstLocationAltitude_g;
+
+ /** With the contents of the current data master,Compare received data */
+ uc_ret = VehicleSensmemcmp(pst_master->uc_data, pst_altitude, sizeof(SENSORLOCATION_ALTITUDEINFO_DAT));
+
+ /** Received data is set in the data master. */
+ pst_master->ul_did = VEHICLE_DID_LOCATION_ALTITUDE;
+ pst_master->us_size = sizeof(SENSORLOCATION_ALTITUDEINFO_DAT);
+ pst_master->uc_rcvflag = VEHICLE_RCVFLAG_ON;
+ memset(pst_master->uc_data, 0x00, sizeof(pst_master->uc_data));
+ memcpy(pst_master->uc_data, pst_altitude, sizeof(SENSORLOCATION_ALTITUDEINFO_DAT));
+
+ return(uc_ret);
+}
/****************************************************************************
@brief VehicleSensGetLocationAltitudeG<BR>