dsf-python 3.4.6.post4__tar.gz → 3.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. {dsf-python-3.4.6.post4/src/dsf_python.egg-info → dsf_python-3.5.0}/PKG-INFO +6 -2
  2. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/README.md +1 -1
  3. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/setup.py +5 -1
  4. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/code.py +1 -2
  5. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/code_channel.py +6 -0
  6. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/code_interception.py +2 -2
  7. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/code_parameter.py +0 -1
  8. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/generic.py +24 -4
  9. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/http_endpoints.py +1 -1
  10. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/user_sessions.py +1 -17
  11. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/connections/__init__.py +2 -2
  12. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/connections/base_command_connection.py +1 -2
  13. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/connections/base_connection.py +6 -13
  14. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/connections/exceptions.py +0 -7
  15. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/connections/init_messages/client_init_messages.py +10 -5
  16. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/connections/intercept_connection.py +15 -5
  17. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/http.py +1 -1
  18. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/__init__.py +3 -3
  19. dsf_python-3.5.0/src/dsf/object_model/boards/__init__.py +10 -0
  20. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/boards/accelerometer.py +13 -0
  21. dsf-python-3.4.6.post4/src/dsf/object_model/boards/closed_loop.py → dsf_python-3.5.0/src/dsf/object_model/boards/board_closed_loop.py +2 -2
  22. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/boards/boards.py +69 -28
  23. dsf_python-3.5.0/src/dsf/object_model/boards/direct_display/__init__.py +8 -0
  24. dsf_python-3.5.0/src/dsf/object_model/boards/direct_display/direct_display.py +23 -0
  25. dsf_python-3.5.0/src/dsf/object_model/boards/direct_display/direct_display_controller.py +14 -0
  26. dsf_python-3.5.0/src/dsf/object_model/boards/direct_display/direct_display_encoder.py +19 -0
  27. dsf_python-3.5.0/src/dsf/object_model/boards/direct_display/direct_display_screen.py +101 -0
  28. dsf_python-3.5.0/src/dsf/object_model/boards/direct_display/direct_display_screen_st7567.py +31 -0
  29. dsf_python-3.5.0/src/dsf/object_model/boards/driver.py +29 -0
  30. dsf_python-3.5.0/src/dsf/object_model/boards/driver_closed_loop.py +77 -0
  31. dsf_python-3.5.0/src/dsf/object_model/boards/inductive_sensor.py +9 -0
  32. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/directories/directories.py +7 -18
  33. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/fans/fan_thermostatic_control.py +17 -7
  34. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/fans/fans.py +19 -8
  35. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/heat/heat.py +6 -6
  36. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/heat/heater.py +35 -2
  37. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/heat/heater_model.py +1 -3
  38. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/heat/heater_model_pid.py +5 -5
  39. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/heat/heater_monitor.py +20 -9
  40. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/inputs/__init__.py +2 -1
  41. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/inputs/input_channel.py +64 -20
  42. dsf_python-3.5.0/src/dsf/object_model/inputs/inputs.py +22 -0
  43. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/job/build.py +5 -5
  44. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/job/build_object.py +10 -10
  45. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/job/gcode_fileinfo.py +19 -20
  46. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/job/job.py +54 -39
  47. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/job/layer.py +6 -6
  48. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/job/thumbnail_info.py +9 -10
  49. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/job/times_left.py +7 -7
  50. dsf_python-3.5.0/src/dsf/object_model/led_strips/__init__.py +1 -0
  51. dsf_python-3.5.0/src/dsf/object_model/led_strips/led_strip.py +74 -0
  52. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/limits/limits.py +73 -51
  53. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/messages/messages.py +6 -9
  54. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/model_collection.py +1 -3
  55. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/model_dictionary.py +2 -4
  56. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/model_object.py +3 -3
  57. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/axis.py +61 -26
  58. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/current_move.py +18 -7
  59. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/driver_id.py +2 -3
  60. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/extruder.py +34 -23
  61. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/extruder_non_linear.py +3 -3
  62. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/input_shaping.py +17 -16
  63. dsf_python-3.5.0/src/dsf/object_model/move/keepout_zone.py +58 -0
  64. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/kinematics/delta_kinematics.py +7 -7
  65. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/kinematics/delta_tower.py +5 -5
  66. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/kinematics/hangprinter_kinematics.py +3 -3
  67. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/kinematics/kinematics.py +4 -4
  68. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/kinematics/tilt_correction.py +7 -7
  69. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/microstepping.py +2 -2
  70. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/motors_idle_control.py +2 -2
  71. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/move.py +30 -11
  72. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/move_calibration.py +1 -1
  73. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/move_compensation.py +10 -9
  74. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/move_deviations.py +2 -2
  75. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/move_queue_item.py +2 -2
  76. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/move_rotation.py +3 -3
  77. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/move_segmentation.py +6 -6
  78. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/probe_grid.py +6 -6
  79. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/skew.py +4 -4
  80. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/network/network.py +8 -8
  81. dsf_python-3.5.0/src/dsf/object_model/network/network_interface.py +189 -0
  82. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/network/network_state.py +3 -0
  83. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/object_model.py +31 -36
  84. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/plugins/plugin_manifest.py +48 -30
  85. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/plugins/plugins.py +5 -5
  86. dsf_python-3.5.0/src/dsf/object_model/sbc/__init__.py +3 -0
  87. dsf_python-3.5.0/src/dsf/object_model/sbc/cpu.py +50 -0
  88. dsf_python-3.5.0/src/dsf/object_model/sbc/dsf/__init__.py +3 -0
  89. dsf_python-3.5.0/src/dsf/object_model/sbc/dsf/dsf.py +76 -0
  90. dsf-python-3.4.6.post4/src/dsf/object_model/http_endpoints/http_endpoints.py → dsf_python-3.5.0/src/dsf/object_model/sbc/dsf/http_endpoint.py +7 -8
  91. {dsf-python-3.4.6.post4/src/dsf/object_model → dsf_python-3.5.0/src/dsf/object_model/sbc/dsf}/user_sessions/user_sessions.py +13 -18
  92. dsf_python-3.5.0/src/dsf/object_model/sbc/memory.py +30 -0
  93. dsf_python-3.5.0/src/dsf/object_model/sbc/sbc.py +100 -0
  94. dsf_python-3.5.0/src/dsf/object_model/sensors/analog_sensor.py +134 -0
  95. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/sensors/analog_sensor_type.py +9 -0
  96. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/sensors/endstop.py +19 -10
  97. dsf_python-3.5.0/src/dsf/object_model/sensors/filament_monitors/Duet3DFilamentMonitor.py +66 -0
  98. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/sensors/filament_monitors/__init__.py +6 -4
  99. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/sensors/filament_monitors/filament_monitor.py +32 -10
  100. dsf_python-3.5.0/src/dsf/object_model/sensors/filament_monitors/filament_monitor_enable_type.py +14 -0
  101. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/sensors/filament_monitors/laser_filament_monitor.py +14 -14
  102. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/sensors/filament_monitors/pulsed_filament_monitor.py +8 -8
  103. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/sensors/filament_monitors/rotating_magnet_filament_monitor.py +11 -11
  104. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/sensors/gp_input_port.py +1 -1
  105. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/sensors/probe.py +87 -39
  106. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/sensors/sensors.py +6 -6
  107. dsf_python-3.5.0/src/dsf/object_model/sensors/temperature_error.py +62 -0
  108. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/spindles/spindles.py +39 -5
  109. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/state/__init__.py +1 -0
  110. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/state/beep_request.py +2 -2
  111. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/state/gp_output_port.py +13 -1
  112. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/state/message_box.py +82 -13
  113. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/state/restore_point.py +10 -10
  114. dsf_python-3.5.0/src/dsf/object_model/state/startup_error.py +43 -0
  115. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/state/state.py +52 -74
  116. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/tools/tool_retraction.py +5 -5
  117. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/tools/tools.py +22 -21
  118. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/utils.py +2 -2
  119. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/volumes/volumes.py +16 -16
  120. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/utils.py +6 -9
  121. {dsf-python-3.4.6.post4 → dsf_python-3.5.0/src/dsf_python.egg-info}/PKG-INFO +6 -2
  122. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf_python.egg-info/SOURCES.txt +29 -14
  123. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/tests/test_object_model.py +21 -15
  124. dsf-python-3.4.6.post4/src/dsf/object_model/boards/__init__.py +0 -10
  125. dsf-python-3.4.6.post4/src/dsf/object_model/boards/direct_display.py +0 -40
  126. dsf-python-3.4.6.post4/src/dsf/object_model/boards/driver.py +0 -15
  127. dsf-python-3.4.6.post4/src/dsf/object_model/boards/driver_settings.py +0 -27
  128. dsf-python-3.4.6.post4/src/dsf/object_model/boards/stall_detect_settings.py +0 -62
  129. dsf-python-3.4.6.post4/src/dsf/object_model/http_endpoints/__init__.py +0 -4
  130. dsf-python-3.4.6.post4/src/dsf/object_model/network/network_interface.py +0 -164
  131. dsf-python-3.4.6.post4/src/dsf/object_model/scanner/__init__.py +0 -4
  132. dsf-python-3.4.6.post4/src/dsf/object_model/scanner/scanner.py +0 -39
  133. dsf-python-3.4.6.post4/src/dsf/object_model/scanner/scanner_status.py +0 -23
  134. dsf-python-3.4.6.post4/src/dsf/object_model/sensors/analog_sensor.py +0 -47
  135. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/LICENSE +0 -0
  136. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/MANIFEST.in +0 -0
  137. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/pyproject.toml +0 -0
  138. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/setup.cfg +0 -0
  139. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/__init__.py +0 -0
  140. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/__init__.py +0 -0
  141. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/base_command.py +0 -0
  142. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/code_flags.py +0 -0
  143. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/code_type.py +0 -0
  144. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/condition_type.py +0 -0
  145. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/files.py +0 -0
  146. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/model_subscription.py +0 -0
  147. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/object_model.py +0 -0
  148. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/packages.py +0 -0
  149. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/plugins.py +0 -0
  150. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/commands/responses.py +0 -0
  151. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/connections/command_connection.py +0 -0
  152. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/connections/init_messages/__init__.py +0 -0
  153. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/connections/init_messages/server_init_message.py +0 -0
  154. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/connections/subscribe_connection.py +0 -0
  155. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/exceptions.py +0 -0
  156. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/boards/min_max_current.py +0 -0
  157. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/directories/__init__.py +0 -0
  158. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/fans/__init__.py +0 -0
  159. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/heat/__init__.py +0 -0
  160. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/inputs/compatibility.py +0 -0
  161. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/inputs/distance_unit.py +0 -0
  162. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/inputs/input_channel_state.py +0 -0
  163. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/job/__init__.py +0 -0
  164. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/limits/__init__.py +0 -0
  165. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/messages/__init__.py +0 -0
  166. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/__init__.py +0 -0
  167. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/kinematics/__init__.py +0 -0
  168. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/kinematics/core_kinematics.py +0 -0
  169. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/kinematics/kinematics_name.py +0 -0
  170. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/kinematics/polar_kinematics.py +0 -0
  171. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/kinematics/scara_kinematics.py +0 -0
  172. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/move/kinematics/zleadscrew_kinematics.py +0 -0
  173. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/network/__init__.py +0 -0
  174. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/network/network_interface_type.py +0 -0
  175. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/network/network_protocol.py +0 -0
  176. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/plugins/__init__.py +0 -0
  177. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/plugins/sbc_permissions.py +0 -0
  178. {dsf-python-3.4.6.post4/src/dsf/object_model/http_endpoints → dsf_python-3.5.0/src/dsf/object_model/sbc/dsf}/http_endpoint_type.py +0 -0
  179. {dsf-python-3.4.6.post4/src/dsf/object_model → dsf_python-3.5.0/src/dsf/object_model/sbc/dsf}/user_sessions/__init__.py +0 -0
  180. {dsf-python-3.4.6.post4/src/dsf/object_model → dsf_python-3.5.0/src/dsf/object_model/sbc/dsf}/user_sessions/access_level.py +0 -0
  181. {dsf-python-3.4.6.post4/src/dsf/object_model → dsf_python-3.5.0/src/dsf/object_model/sbc/dsf}/user_sessions/session_type.py +0 -0
  182. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/sensors/__init__.py +0 -0
  183. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/sensors/endstop_type.py +0 -0
  184. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/sensors/filament_monitors/filament_monitor_status.py +0 -0
  185. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/sensors/filament_monitors/filament_monitor_type.py +0 -0
  186. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/sensors/probe_type.py +0 -0
  187. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/spindles/__init__.py +0 -0
  188. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/spindles/spindle_state.py +0 -0
  189. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/state/log_level.py +0 -0
  190. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/state/machine_mode.py +0 -0
  191. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/state/machine_status.py +0 -0
  192. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/tools/__init__.py +0 -0
  193. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/tools/tool_state.py +0 -0
  194. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/object_model/volumes/__init__.py +0 -0
  195. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf/utility/__init__.py +0 -0
  196. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf_python.egg-info/dependency_links.txt +0 -0
  197. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf_python.egg-info/requires.txt +0 -0
  198. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/src/dsf_python.egg-info/top_level.txt +0 -0
  199. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/tests/test_code.py +0 -0
  200. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/tests/test_custom_http_endpoint.py +0 -0
  201. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/tests/test_custom_m_codes.py +0 -0
  202. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/tests/test_send_simple_code.py +0 -0
  203. {dsf-python-3.4.6.post4 → dsf_python-3.5.0}/tests/test_subscribe_object_model.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dsf-python
3
- Version: 3.4.6.post4
3
+ Version: 3.5.0
4
4
  Summary: Python interface to access DuetSoftwareFramework
5
5
  Home-page: https://github.com/Duet3D/dsf-python
6
6
  Author: Duet3D Ltd.
@@ -17,6 +17,10 @@ Classifier: Programming Language :: Python :: 3
17
17
  Classifier: Programming Language :: Python :: 3.7
18
18
  Classifier: Programming Language :: Python :: 3.8
19
19
  Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
20
24
  Classifier: Programming Language :: Python :: 3 :: Only
21
25
  Requires-Python: >=3.7, <4
22
26
  Description-Content-Type: text/markdown
@@ -32,7 +36,7 @@ This is also availabe as a [pip package on pypi](https://pypi.org/project/dsf-py
32
36
 
33
37
  Find out more about [Duet Software Framework](https://github.com/Duet3D/DuetSoftwareFramework).
34
38
 
35
- Find out more about [Duet Software Framework Python Bindings](https://github.com/Duet3D/dsf-python).
39
+ Examples of the [Duet Software Framework Python Bindings](https://github.com/Duet3D/dsf-python/tree/main/examples).
36
40
 
37
41
  Get in touch with the community at [Duet Software Framework Forum](https://forum.duet3d.com/category/31/dsf-development) for bug reports, discussion and any kind of exchange.
38
42
 
@@ -4,7 +4,7 @@ This is also availabe as a [pip package on pypi](https://pypi.org/project/dsf-py
4
4
 
5
5
  Find out more about [Duet Software Framework](https://github.com/Duet3D/DuetSoftwareFramework).
6
6
 
7
- Find out more about [Duet Software Framework Python Bindings](https://github.com/Duet3D/dsf-python).
7
+ Examples of the [Duet Software Framework Python Bindings](https://github.com/Duet3D/dsf-python/tree/main/examples).
8
8
 
9
9
  Get in touch with the community at [Duet Software Framework Forum](https://forum.duet3d.com/category/31/dsf-development) for bug reports, discussion and any kind of exchange.
10
10
 
@@ -6,7 +6,7 @@ long_description = open("README.md", encoding="utf-8").read()
6
6
 
7
7
  setuptools.setup(
8
8
  name="dsf-python",
9
- version="3.4.6-4",
9
+ version="3.5.0",
10
10
  description="Python interface to access DuetSoftwareFramework",
11
11
  long_description=long_description,
12
12
  long_description_content_type="text/markdown",
@@ -22,6 +22,10 @@ setuptools.setup(
22
22
  "Programming Language :: Python :: 3.7",
23
23
  "Programming Language :: Python :: 3.8",
24
24
  "Programming Language :: Python :: 3.9",
25
+ "Programming Language :: Python :: 3.10",
26
+ "Programming Language :: Python :: 3.11",
27
+ "Programming Language :: Python :: 3.12",
28
+ "Programming Language :: Python :: 3.13",
25
29
  "Programming Language :: Python :: 3 :: Only",
26
30
  ],
27
31
  install_requires=[
@@ -1,4 +1,3 @@
1
- from __future__ import annotations
2
1
  from typing import List, Optional
3
2
 
4
3
  from .base_command import BaseCommand
@@ -79,7 +78,7 @@ class Code(BaseCommand):
79
78
  @property
80
79
  def is_from_file_channel(self) -> bool:
81
80
  """Check if this code is from a file channel"""
82
- return self.channel is CodeChannel.File
81
+ return self.channel is CodeChannel.File or self.channel is CodeChannel.File2
83
82
 
84
83
  def parameter(self, letter: str, default=None):
85
84
  """Retrieve the parameter whose letter equals c or generate a default parameter"""
@@ -40,6 +40,12 @@ class CodeChannel(str, Enum):
40
40
  # Code channel that executes macros on power fail, heater faults and filament out
41
41
  Autopause = "Autopause"
42
42
 
43
+ # Code channel for secondary file prints
44
+ File2 = "File2"
45
+
46
+ # Code channel for the code queue that executes a couple of codes in-sync with moves of the primary print file
47
+ Queue2 = "Queue2"
48
+
43
49
  # Unknown code channel
44
50
  Unknown = "Unknown"
45
51
 
@@ -1,4 +1,4 @@
1
- from __future__ import annotations
1
+ from typing import Optional
2
2
 
3
3
  from .base_command import BaseCommand
4
4
  from ..object_model.messages import MessageType
@@ -17,7 +17,7 @@ def ignore():
17
17
  return BaseCommand("Ignore")
18
18
 
19
19
 
20
- def resolve_code(rtype: MessageType, content: str | None = None):
20
+ def resolve_code(rtype: MessageType, content: Optional[str]):
21
21
  """
22
22
  Resolve the code to intercept and return the given message details for its completion.
23
23
  This command is only permitted in ConnectionMode.Intercept mode.
@@ -1,7 +1,6 @@
1
1
  """
2
2
  codeparameter contains all classes and methods dealing with deserialized code parameters.
3
3
  """
4
- from __future__ import annotations
5
4
  import json
6
5
 
7
6
  from ..exceptions import CodeParserException
@@ -1,4 +1,4 @@
1
- from __future__ import annotations
1
+ from typing import Optional
2
2
 
3
3
  from .base_command import BaseCommand
4
4
  from .code_channel import CodeChannel
@@ -10,7 +10,9 @@ def check_password(password: str):
10
10
  """
11
11
  Check if the given password is correct and matches the previously set value from M551.
12
12
  If no password was configured before or if it was set to "reprap", this will always return true
13
+
13
14
  :param password: Password to check
15
+
14
16
  :returns: true if the password matches or is not set
15
17
  """
16
18
  if not isinstance(password, str) or not password:
@@ -23,6 +25,7 @@ def evaluate_expression(channel: CodeChannel, expression: str):
23
25
  Evaluate an arbitrary expression on the given channel in RepRapFirmware.
24
26
  Do not use this call to evaluate file-based and network-related fields because the
25
27
  DSF and RRF models diverge in this regard.
28
+
26
29
  :param channel: Code channel where the expression is evaluated
27
30
  :param expression: Expression to evaluate
28
31
  """
@@ -33,22 +36,36 @@ def evaluate_expression(channel: CodeChannel, expression: str):
33
36
  return BaseCommand("EvaluateExpression", **{"Channel": channel, "Expression": expression})
34
37
 
35
38
 
36
- def flush(channel: CodeChannel):
39
+ def flush(channel: CodeChannel, sync_file_streams: bool = False, if_executing: bool = True):
37
40
  """
38
41
  Wait for all pending (macro) codes on the given channel to finish.
39
42
  This effectively guarantees that all buffered codes are processed by RRF before this command finishes.
43
+
40
44
  :param channel: Code channel to flush
45
+ :param sync_file_streams: Whether the File and File2 streams are supposed to synchronize if a code is being
46
+ intercepted. This option should be used with care, under certain circumstances this can lead to a deadlock!
47
+ :param if_executing: Check if the corresponding channel is actually executing codes (i.e. if it is active).
48
+ If the input channel is not active, this command returns false.
49
+ This option is ignored if SyncFileStreams is true.
50
+
41
51
  :returns: true if the flush request is successful
42
52
  """
43
53
  if not isinstance(channel, CodeChannel):
44
54
  raise TypeError("channel must be a CodeChannel")
45
- return BaseCommand("Flush", **{"Channel": channel})
55
+ if not isinstance(sync_file_streams, bool):
56
+ raise TypeError("sync_file_streams must be a boolean")
57
+ if not isinstance(if_executing, bool):
58
+ raise TypeError("if_executing must be a boolean")
59
+ return BaseCommand("Flush",
60
+ **{"Channel": channel, "SyncFileStreams": sync_file_streams, "IfExecuting": if_executing})
46
61
 
47
62
 
48
63
  def invalidate_channel(channel: CodeChannel):
49
64
  """
50
65
  Invalidate all pending codes and files on a given channel (including buffered codes from DSF in RepRapFirmware)
66
+
51
67
  :param channel: Code channel to invalidate
68
+
52
69
  :returns: true if the invalidate request is successful
53
70
  """
54
71
  if not isinstance(channel, CodeChannel):
@@ -59,6 +76,7 @@ def invalidate_channel(channel: CodeChannel):
59
76
  def set_update_status(updating: bool):
60
77
  """
61
78
  Override the current status as reported by the object model when performing a software update.
79
+
62
80
  :param updating: Whether an update is now in progress
63
81
  """
64
82
  if not isinstance(updating, bool):
@@ -73,6 +91,7 @@ def simple_code(code: str, channel: CodeChannel = CodeChannel.DEFAULT_CHANNEL, a
73
91
  its Code.Result is transformed back into a basic string. This is useful for minimal
74
92
  extensions that do not require granular control of the code details. Except for certain cases, it
75
93
  is NOT recommended for usage in InterceptionMode because it renders the internal code buffer useless.
94
+
76
95
  :param code: Code to parse and execute
77
96
  :param channel: Destination channel
78
97
  :param async_exec: Whether this code may be executed asynchronously.
@@ -89,10 +108,11 @@ def write_message(
89
108
  message_type: MessageType,
90
109
  content: str,
91
110
  output_message: bool = True,
92
- log_level: LogLevel | None = None,
111
+ log_level: Optional[LogLevel] = None,
93
112
  ):
94
113
  """
95
114
  Write an arbitrary generic message
115
+
96
116
  :param message_type: Type of the message to write
97
117
  :param content: Content of the message to write
98
118
  :param output_message: Output the message on the console and via the object model
@@ -1,5 +1,5 @@
1
1
  from .base_command import BaseCommand
2
- from ..object_model.http_endpoints import HttpEndpointType
2
+ from ..object_model import HttpEndpointType
3
3
 
4
4
 
5
5
  def add_http_endpoint(endpoint_type: HttpEndpointType, namespace: str, path: str, is_upload_request: bool):
@@ -1,21 +1,5 @@
1
- from enum import Enum
2
-
3
1
  from .base_command import BaseCommand
4
-
5
-
6
- class AccessLevel(str, Enum):
7
- """Defines what a user is allowed to do"""
8
-
9
- ReadOnly = "ReadOnly"
10
- ReadWrite = "ReadWrite"
11
-
12
-
13
- class SessionType(str, Enum):
14
- """Types of user sessions"""
15
-
16
- Local = "Local"
17
- HTTP = "HTTP"
18
- Telnet = "Telnet"
2
+ from ..object_model import AccessLevel, SessionType
19
3
 
20
4
 
21
5
  def add_user_session(access_level: AccessLevel, session_type: SessionType, origin: str):
@@ -24,8 +24,8 @@ class InterceptionMode(str, Enum):
24
24
  # Intercept codes before they are internally processed by the control server
25
25
  PRE = "Pre"
26
26
 
27
- # Intercept codes after the initial processing of the control server but before they are forwarded to
28
- # the RepRapFirmware controller
27
+ # Intercept codes after the initial processing of the control server, but before they are forwarded
28
+ # to the RepRapFirmware controller
29
29
  POST = "Post"
30
30
 
31
31
  # Receive a notification for executed codes. In this state the final result can be still changed
@@ -5,8 +5,7 @@ from .. import commands, DEFAULT_BACKLOG
5
5
  from ..commands import code
6
6
  from ..commands.code_channel import CodeChannel
7
7
  from ..http import HttpEndpointUnixSocket
8
- from ..object_model import ObjectModel
9
- from ..object_model.http_endpoints import HttpEndpointType
8
+ from ..object_model import HttpEndpointType, ObjectModel
10
9
  from ..object_model.job import GCodeFileInfo
11
10
  from ..object_model.messages import Message, MessageType
12
11
  from ..object_model.state import LogLevel
@@ -1,9 +1,8 @@
1
- from __future__ import annotations
2
1
  import json
3
2
  import socket
3
+ from typing import Optional
4
4
 
5
- from .exceptions import (IncompatibleVersionException, InternalServerException, IPCSocketBrokenException,
6
- TaskCanceledException)
5
+ from .exceptions import IncompatibleVersionException, InternalServerException, TaskCanceledException
7
6
  from .init_messages import client_init_messages, server_init_message
8
7
  from ..commands import responses
9
8
 
@@ -12,16 +11,12 @@ class BaseConnection:
12
11
  """
13
12
  Base class for connections that access the control server via the Duet API
14
13
  using a UNIX socket
15
-
16
- Constructor arguments:
17
- :param debug: Whether to print debug information or not
18
- :param timeout: Set a timeout value on blocking socket operations or None to set the socket in non-blocking mode
19
14
  """
20
15
 
21
- def __init__(self, debug: bool = False, timeout: int = None):
16
+ def __init__(self, debug: bool = False, timeout: int = 3):
22
17
  self.debug = debug
23
18
  self.timeout = timeout
24
- self.socket: socket.socket | None = None
19
+ self.socket: Optional[socket.socket] = None
25
20
  self.id = None
26
21
  self.input = ""
27
22
 
@@ -30,7 +25,7 @@ class BaseConnection:
30
25
 
31
26
  self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
32
27
  self.socket.connect(socket_file)
33
- self.socket.settimeout(self.timeout)
28
+ self.socket.setblocking(True)
34
29
  server_init_msg = server_init_message.ServerInitMessage.from_json(
35
30
  json.loads(self.socket.recv(50).decode("utf8"))
36
31
  )
@@ -117,9 +112,7 @@ class BaseConnection:
117
112
  except Exception as e:
118
113
  raise e
119
114
  # either 0 or end of data
120
- if part == b"":
121
- raise IPCSocketBrokenException()
122
- elif len(part) < BUFF_SIZE:
115
+ if len(part) < BUFF_SIZE:
123
116
  break
124
117
 
125
118
  json_string += data.decode("utf8")
@@ -14,10 +14,3 @@ class InternalServerException(Exception):
14
14
 
15
15
  class TaskCanceledException(Exception):
16
16
  """Exception returned by the server if the task has been cancelled remotely"""
17
-
18
-
19
- class IPCSocketBrokenException(Exception):
20
- """Exception raised if the IPC connection has been closed on the remote server"""
21
-
22
- def __init__(self):
23
- super().__init__("IPC socket connection broken")
@@ -17,7 +17,7 @@ clientinitmessages holds all messages a client can send to the server to initiat
17
17
  You should have received a copy of the GNU Lesser General Public License
18
18
  along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  """
20
- from __future__ import annotations
20
+ from typing import List
21
21
  from .server_init_message import ServerInitMessage
22
22
  from .. import ConnectionMode, InterceptionMode, SubscriptionMode
23
23
  from ...commands.code_channel import CodeChannel
@@ -38,10 +38,11 @@ class ClientInitMessage:
38
38
 
39
39
  def intercept_init_message(
40
40
  intercept_mode: InterceptionMode,
41
- channels: list[CodeChannel],
42
- filters: list[str],
41
+ channels: List[CodeChannel],
42
+ filters: List[str],
43
43
  priority_codes: bool,
44
- auto_flush: bool = True):
44
+ auto_flush: bool = True,
45
+ auto_evaluate_expression: bool = True):
45
46
  """
46
47
  Enter interception mode
47
48
  Whenever a code is received, the connection must respond with one of
@@ -62,6 +63,9 @@ def intercept_init_message(
62
63
  is specified.
63
64
  This option makes extra Flush calls in the interceptor implementation obsolete.
64
65
  It is highly recommended to enable this in order to avoid potential deadlocks when dealing with macros!
66
+ :param auto_evaluate_expression: Automatically evaluate expression parameters to their final values
67
+ before sending it over to the client.
68
+ This requires auto_flush to be True and happens when the remaining codes have been processed.
65
69
  """
66
70
  return ClientInitMessage(
67
71
  ConnectionMode.INTERCEPT,
@@ -69,8 +73,9 @@ def intercept_init_message(
69
73
  "InterceptionMode": intercept_mode,
70
74
  "Channels": channels,
71
75
  "AutoFlush": auto_flush,
76
+ "AutoEvaluateExpressions": auto_evaluate_expression,
72
77
  "Filters": filters,
73
- "PriortyCodes": priority_codes,
78
+ "PriorityCodes": priority_codes,
74
79
  },
75
80
  )
76
81
 
@@ -1,4 +1,4 @@
1
- from __future__ import annotations
1
+ from typing import List, Optional
2
2
 
3
3
  from .base_command_connection import BaseCommandConnection
4
4
  from .init_messages import client_init_messages
@@ -21,6 +21,9 @@ class InterceptConnection(BaseCommandConnection):
21
21
  in case a code filter is specified.
22
22
  This option makes extra Flush calls in the interceptor implementation obsolete.
23
23
  It is highly recommended to enable this in order to avoid potential deadlocks when dealing with macros!
24
+ :param auto_evaluate_expression: Automatically evaluate expression parameters to their final values
25
+ before sending it over to the client.
26
+ This requires auto_flush to be True and happens when the remaining codes have been processed.
24
27
  :param priority_codes: Defines if priority codes may be intercepted (e.g. M122 or M999)
25
28
  :param debug: Whether debugging output is turned on for this connection
26
29
  """
@@ -28,9 +31,10 @@ class InterceptConnection(BaseCommandConnection):
28
31
  def __init__(
29
32
  self,
30
33
  interception_mode: client_init_messages.InterceptionMode,
31
- channels: list[CodeChannel] = None,
32
- filters: list[str] = None,
34
+ channels: List[CodeChannel] = None,
35
+ filters: List[str] = None,
33
36
  auto_flush: bool = True,
37
+ auto_evaluate_expression: bool = True,
34
38
  priority_codes: bool = False,
35
39
  debug: bool = False,
36
40
  ):
@@ -39,12 +43,18 @@ class InterceptConnection(BaseCommandConnection):
39
43
  self.channels = channels if channels is not None else CodeChannel.list()
40
44
  self.filters = filters
41
45
  self.auto_flush = auto_flush
46
+ self.auto_evaluate_expression = auto_evaluate_expression
42
47
  self.priority_codes = priority_codes
43
48
 
44
49
  def connect(self, socket_file: str = SOCKET_FILE): # noqa
45
50
  """Establishes a connection to the given UNIX socket file"""
46
51
  iim = client_init_messages.intercept_init_message(
47
- self.interception_mode, self.channels, self.filters, self.priority_codes, self.auto_flush
52
+ self.interception_mode,
53
+ self.channels,
54
+ self.filters,
55
+ self.priority_codes,
56
+ self.auto_flush,
57
+ self.auto_evaluate_expression
48
58
  )
49
59
  return super().connect(iim, socket_file)
50
60
 
@@ -60,7 +70,7 @@ class InterceptConnection(BaseCommandConnection):
60
70
  """Instruct the control server to ignore the last received code (in intercepting mode)"""
61
71
  self.send(commands.code_interception.ignore())
62
72
 
63
- def resolve_code(self, rtype: MessageType = MessageType.Success, content: str | None = None):
73
+ def resolve_code(self, rtype: MessageType = MessageType.Success, content: Optional[str] = None):
64
74
  """
65
75
  Instruct the control server to resolve the last received code with the given
66
76
  message details (in intercepting mode)
@@ -5,7 +5,7 @@ from concurrent.futures import ThreadPoolExecutor
5
5
  from enum import Enum
6
6
 
7
7
  from . import DEFAULT_BACKLOG
8
- from .object_model.http_endpoints import HttpEndpointType
8
+ from .object_model import HttpEndpointType
9
9
 
10
10
 
11
11
  class HttpResponseType(str, Enum):
@@ -2,19 +2,19 @@ from .boards import Board, BoardState
2
2
  from .directories import Directories
3
3
  from .fans import Fan
4
4
  from .heat import Heat, Heater, HeaterState
5
- from .http_endpoints import HttpEndpoint, HttpEndpointType
6
5
  from .inputs import InputChannel
7
6
  from .job import Job
7
+ from .led_strips import LedStrip, LedStripType
8
8
  from .limits import Limits
9
9
  from .messages import Message, MessageType
10
10
  from .move import DriverId, Move
11
11
  from .network import Network, NetworkInterface, NetworkInterfaceType, NetworkProtocol, NetworkState
12
12
  from .object_model import ObjectModel
13
13
  from .plugins import Plugin, PluginManifest, SbcPermissions
14
- from .scanner import Scanner, ScannerStatus
14
+ from .sbc import CPU, Memory, SBC
15
+ from .sbc.dsf import AccessLevel, HttpEndpoint, HttpEndpointType, SessionType, UserSession
15
16
  from .sensors import AnalogSensor, AnalogSensorType, Endstop, EndstopType, GpInputPort, Probe, ProbeType, Sensors
16
17
  from .spindles import Spindle, SpindleState
17
18
  from .state import LogLevel, MachineStatus, MessageBox, MessageBoxMode, State
18
19
  from .tools import Tool, ToolState
19
- from .user_sessions import AccessLevel, SessionType, UserSession
20
20
  from .volumes import Volume
@@ -0,0 +1,10 @@
1
+ from .accelerometer import Accelerometer
2
+ from .boards import Board, BoardState
3
+ from .board_closed_loop import BoardClosedLoop
4
+ from .direct_display import DirectDisplay
5
+ from .driver import Driver
6
+ from .driver_closed_loop import DriverClosedLoop, ClosedLoopCurrentFraction, ClosedLoopPositionError
7
+ from .min_max_current import MinMaxCurrent
8
+
9
+ __all__ = ['Accelerometer', 'Board', 'BoardState', 'BoardClosedLoop', 'DirectDisplay', 'Driver', 'DriverClosedLoop',
10
+ 'ClosedLoopCurrentFraction', 'ClosedLoopPositionError', 'MinMaxCurrent']
@@ -5,11 +5,24 @@ class Accelerometer(ModelObject):
5
5
  """This represents an accelerometer"""
6
6
  def __init__(self):
7
7
  super(Accelerometer, self).__init__()
8
+ # Orientation of the accelerometer
9
+ # See https://docs.duet3d.com/en/Duet3D_hardware/Accessories/Duet3D_Accelerometer#orientation for a list of orientations
10
+ self._orientation = 20
8
11
  # Number of collected data points in the last run or 0 if it failed
9
12
  self._points = 0
10
13
  # Number of completed sampling runs
11
14
  self._runs = 0
12
15
 
16
+ @property
17
+ def orientation(self) -> int:
18
+ """Orientation of the accelerometer
19
+ See https://docs.duet3d.com/en/Duet3D_hardware/Accessories/Duet3D_Accelerometer#orientation for a list of orientations"""
20
+ return self._orientation
21
+
22
+ @orientation.setter
23
+ def orientation(self, value):
24
+ self._orientation = int(value)
25
+
13
26
  @property
14
27
  def points(self) -> int:
15
28
  """Number of collected data points in the last run or 0 if it failed"""
@@ -1,10 +1,10 @@
1
1
  from ..model_object import ModelObject
2
2
 
3
3
 
4
- class ClosedLoop(ModelObject):
4
+ class BoardClosedLoop(ModelObject):
5
5
  """This represents information about closed-loop tuning"""
6
6
  def __init__(self):
7
- super(ClosedLoop, self).__init__()
7
+ super(BoardClosedLoop, self).__init__()
8
8
  # Number of collected data points in the last run or 0 if it failed
9
9
  self._points = 0
10
10
  # Number of completed sampling runs