File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
samples/sensor/sensor_shell/pytest Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ static const char *sensor_channel_name[SENSOR_CHAN_COMMON_COUNT] = {
8888 [SENSOR_CHAN_POS_DZ ] = "pos_dz" ,
8989 [SENSOR_CHAN_POS_DXYZ ] = "pos_dxyz" ,
9090 [SENSOR_CHAN_RPM ] = "rpm" ,
91+ [SENSOR_CHAN_FREQUENCY ] = "frequency" ,
9192 [SENSOR_CHAN_GAUGE_VOLTAGE ] = "gauge_voltage" ,
9293 [SENSOR_CHAN_GAUGE_AVG_CURRENT ] = "gauge_avg_current" ,
9394 [SENSOR_CHAN_GAUGE_STDBY_CURRENT ] = "gauge_stdby_current" ,
Original file line number Diff line number Diff line change @@ -156,6 +156,9 @@ enum sensor_channel {
156156 /** Revolutions per minute, in RPM. */
157157 SENSOR_CHAN_RPM ,
158158
159+ /** Frequency, in Hz. */
160+ SENSOR_CHAN_FREQUENCY ,
161+
159162 /** Voltage, in volts **/
160163 SENSOR_CHAN_GAUGE_VOLTAGE ,
161164 /** Average current, in amps **/
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ def test_sensor_shell_attr_get(shell: Shell):
3737 lines = shell .exec_command ('sensor attr_get sensor@0 co2 sampling_frequency' )
3838 assert any (['sensor@0(channel=co2, attr=sampling_frequency)' in line for line in lines ]), 'expected response not found'
3939
40- lines = shell .exec_command ('sensor attr_get sensor@1 53 3' )
40+ lines = shell .exec_command ('sensor attr_get sensor@1 54 3' )
4141 assert any (['sensor@1(channel=gauge_state_of_health, attr=slope_th)' in line for line in lines ]), 'expected response not found'
4242
4343 logger .info ('response is valid' )
@@ -50,7 +50,7 @@ def test_sensor_shell_attr_set(shell: Shell):
5050 expected_line = 'sensor@0 channel=co2, attr=sampling_frequency set to value=1'
5151 assert any ([expected_line in line for line in lines ]), 'expected response not found'
5252
53- lines = shell .exec_command ('sensor attr_set sensor@1 53 3 1' )
53+ lines = shell .exec_command ('sensor attr_set sensor@1 54 3 1' )
5454 expected_line = 'sensor@1 channel=gauge_state_of_health, attr=slope_th set to value=1'
5555 assert any ([expected_line in line for line in lines ]), 'expected response not found'
5656
You can’t perform that action at this time.
0 commit comments