@@ -164,7 +164,6 @@ typedef struct
164164 uint8_t flags ;
165165 uint8_t rx_error ;
166166 uint8_t num_modes ;
167- uint8_t is_unreported ;
168167 uint8_t is_mode_busy ;
169168 uint8_t is_motor_busy ;
170169 uint8_t num_combi_modes ;
@@ -321,7 +320,6 @@ Device_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
321320 self -> saved_current_mode = 0 ;
322321 self -> flags = 0 ;
323322 self -> rx_error = 0 ;
324- self -> is_unreported = 0 ;
325323 self -> is_mode_busy = 0 ;
326324 self -> is_motor_busy = 0 ;
327325 self -> num_combi_modes = 0 ;
@@ -418,7 +416,6 @@ static int set_simple_mode(DeviceObject *device, int mode)
418416 old_list = device -> values ;
419417 device -> values = new_list ;
420418 Py_XDECREF (old_list );
421- device -> is_unreported = 0 ;
422419 }
423420 return 0 ;
424421}
@@ -456,7 +453,6 @@ static int set_combi_mode(DeviceObject *device,
456453 old_list = device -> values ;
457454 device -> values = new_list ;
458455 Py_XDECREF (old_list );
459- device -> is_unreported = 0 ;
460456 }
461457
462458 return 0 ;
@@ -973,11 +969,8 @@ Device_get(PyObject *self, PyObject *args)
973969
974970 if (device_ensure_mode_info (self ) < 0 )
975971 return NULL ;
976- if (!device -> is_unreported )
977- {
978- if (get_value (device ) < 0 )
979- return NULL ;
980- }
972+ if (get_value (device ) < 0 )
973+ return NULL ;
981974
982975 /* "format" now contains the format code to use: Raw (0), Pct (1) or
983976 * SI (2).
@@ -1037,7 +1030,6 @@ Device_get(PyObject *self, PyObject *args)
10371030 }
10381031 }
10391032
1040- device -> is_unreported = 0 ;
10411033 return results ;
10421034}
10431035
@@ -1411,7 +1403,6 @@ int device_new_value(PyObject *self, uint8_t *buffer, uint16_t nbytes)
14111403 PyObject * old_values = device -> values ;
14121404 device -> values = values ;
14131405 Py_XDECREF (old_values );
1414- device -> is_unreported = 1 ;
14151406
14161407 return bytes_consumed ;
14171408}
@@ -1491,7 +1482,6 @@ int device_new_combi_value(PyObject *self,
14911482 PyObject * old_values = device -> values ;
14921483 device -> values = values ;
14931484 Py_XDECREF (old_values );
1494- device -> is_unreported = 1 ;
14951485
14961486 return bytes_consumed ;
14971487}
@@ -1503,8 +1493,7 @@ int device_new_format(PyObject *self)
15031493
15041494 /* A device is considered busy with its mode inbetween sending
15051495 * the Port Input Format message confirming a mode/format change
1506- * and the next Port Value message. This may supercede the
1507- * device->is_unreported flag.
1496+ * and the next Port Value message.
15081497 */
15091498 device -> is_mode_busy = 1 ;
15101499 return 0 ;
0 commit comments