diff --git a/interfaces/native/include/sensor_agent_type.h b/interfaces/native/include/sensor_agent_type.h index 6486ac9623b5d44a5a6a7ad6a17d88c6142f7fb9..7a04758803a210c4109a1ee2ae67738eb78a79fe 100644 --- a/interfaces/native/include/sensor_agent_type.h +++ b/interfaces/native/include/sensor_agent_type.h @@ -188,7 +188,7 @@ typedef struct LinearAccelData { float x; float y; float z; -} LineraAccelData; +} LinearAccelData; /** * @brief Defines the gyroscope sensor data structure. Measures the rotational angular velocity of the @@ -211,7 +211,7 @@ typedef struct GravityData { } GravityData; /** - * @brief Defines the uncalibred accelerometer data structure. Measures the uncalibred accelerometer applied to + * @brief Defines the uncalibrated accelerometer data structure. Measures the uncalibrated accelerometer applied to * the device on three physical axes (x, y, and z) in m/s2. */ typedef struct AccelUncalibratedData { @@ -224,7 +224,7 @@ typedef struct AccelUncalibratedData { } AccelUncalibratedData; /** - * @brief Defines the uncalibred gyroscope sensor data structure. Measures the uncalibred rotational angular velocity of the + * @brief Defines the uncalibrated gyroscope sensor data structure. Measures the uncalibrated rotational angular velocity of the * device on three physical axes (x, y, and z) in rad/s. */ typedef struct GyroUncalibratedData { @@ -286,7 +286,7 @@ typedef struct MagneticFieldData { } MagneticFieldData; /** - * @brief Defines the uncalibred magnetic field sensor data structure. Measure the uncalibred ambient geomagnetic field in three + * @brief Defines the uncalibrated magnetic field sensor data structure. Measure the uncalibrated ambient geomagnetic field in three * physical axes (x, y, z) in μT. */ typedef struct MagneticFieldUncalibratedData { diff --git a/interfaces/plugin/test/unittest/ExampleJsunit.test.js b/interfaces/plugin/test/unittest/ExampleJsunit.test.js index ff75e1a6ba0e6c22079db42b8182b275e54c2ca8..c81d1f35833ca20bccd8fbc7bcc36a6a0fef067b 100644 --- a/interfaces/plugin/test/unittest/ExampleJsunit.test.js +++ b/interfaces/plugin/test/unittest/ExampleJsunit.test.js @@ -462,38 +462,6 @@ describe("SensorJsTest", function () { Promise.all(promiseArray).then(done) }) - /** - * test - * - * @tc.name: SensorJsTest_019 - * @tc.desc: Verification results of the incorrect parameters of the test interface. - * @tc.require: AR000GH2U6 - * @tc.author: - */ - it('SensorJsTest_019', 0, async function (done) { - console.info("---------------------------SensorJsTest_019----------------------------------"); - let geomagneticComponent = [27779.234375, -6214.9794921875, -14924.6611328125, -27.667943954467773, -12.610970497131348, 28465.9765625, 32141.2109375] - sensor.getGeomagneticField({'latitude':0, 'longitude':0, 'altitude':0}, Number.MAX_VALUE, (error, data) => { - if (error) { - console.info('SensorJsTest_019 failed'); - expect(false).assertTrue(); - } else { - console.info('SensorJsTest_019 x: ' + data.x + ',y: ' + data.y + ',z: ' + data.z + ',geomagneticDip: ' + data.geomagneticDip - + ',deflectionAngle: ' + data.deflectionAngle + ',levelIntensity: ' + data.levelIntensity + ',totalIntensity: ' + data.totalIntensity) - expect(data.x).assertEqual(geomagneticComponent[0]) - expect(data.y).assertEqual(geomagneticComponent[1]) - expect(data.z).assertEqual(geomagneticComponent[2]) - expect(data.geomagneticDip).assertEqual(geomagneticComponent[3]) - expect(data.deflectionAngle).assertEqual(geomagneticComponent[4]) - expect(data.levelIntensity).assertEqual(geomagneticComponent[5]) - expect(data.totalIntensity).assertEqual(geomagneticComponent[6]) - } - setTimeout(() =>{ - done() - }, 500) - }) - }) - /** * test * @@ -1108,33 +1076,6 @@ describe("SensorJsTest", function () { done() }) - /** - * test - * - * @tc.name: SensorJsTest_043 - * @tc.desc: Verification results of the incorrect parameters of the test interface. - * @tc.require: AR000GH2UB - * @tc.author: - */ - it("SensorJsTest_043", 0, async function (done) { - console.info('----------------------SensorJsTest_043---------------------------'); - let geomagneticComponent = [27779.234375, -6214.9794921875, -14924.6611328125, -27.667943954467773, -12.610970497131348, 28465.9765625, 32141.2109375] - await sensor.getGeomagneticField({'latitude':0, 'longitude':0, 'altitude':0}, Number.MAX_VALUE).then((data) => { - console.info('SensorJsTest_043 x: ' + data.x + ',y: ' + data.y + ',z: ' + data.z + ',geomagneticDip: ' + data.geomagneticDip - + ',deflectionAngle: ' + data.deflectionAngle + ',levelIntensity: ' + data.levelIntensity + ',totalIntensity: ' + data.totalIntensity) - expect(data.x).assertEqual(geomagneticComponent[0]) - expect(data.y).assertEqual(geomagneticComponent[1]) - expect(data.z).assertEqual(geomagneticComponent[2]) - expect(data.geomagneticDip).assertEqual(geomagneticComponent[3]) - expect(data.deflectionAngle).assertEqual(geomagneticComponent[4]) - expect(data.levelIntensity).assertEqual(geomagneticComponent[5]) - expect(data.totalIntensity).assertEqual(geomagneticComponent[6]) - }).catch((error) => { - console.info("promise::catch", error) - }); - done() - }) - /** * test *