{ "type": "translation_unit", "children": [ { "type": "preproc_ifdef", "children": [ { "type": "#ifndef", "text": "#ifndef" }, { "type": "identifier", "text": "PLUNGER_H" }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "PLUNGER_H" } ] }, { "type": "preproc_include", "children": [ { "type": "#include", "text": "#include" }, { "type": "string_literal", "children": [ { "type": "\"", "text": "\"" }, { "type": "string_content", "text": "config.h" }, { "type": "\"", "text": "\"" } ] } ] }, { "type": "preproc_include", "children": [ { "type": "#include", "text": "#include" }, { "type": "system_lib_string", "text": "" } ] }, { "type": "preproc_include", "children": [ { "type": "#include", "text": "#include" }, { "type": "system_lib_string", "text": "" } ] }, { "type": "preproc_include", "children": [ { "type": "#include", "text": "#include" }, { "type": "string_literal", "children": [ { "type": "\"", "text": "\"" }, { "type": "string_content", "text": "./SAKO_VFD.h" }, { "type": "\"", "text": "\"" } ] } ] }, { "type": "preproc_include", "children": [ { "type": "#include", "text": "#include" }, { "type": "string_literal", "children": [ { "type": "\"", "text": "\"" }, { "type": "string_content", "text": "./3PosAnalog.h" }, { "type": "\"", "text": "\"" } ] } ] }, { "type": "preproc_include", "children": [ { "type": "#include", "text": "#include" }, { "type": "string_literal", "children": [ { "type": "\"", "text": "\"" }, { "type": "string_content", "text": "./POT.h" }, { "type": "\"", "text": "\"" } ] } ] }, { "type": "preproc_include", "children": [ { "type": "#include", "text": "#include" }, { "type": "string_literal", "children": [ { "type": "\"", "text": "\"" }, { "type": "string_content", "text": "enums.h" }, { "type": "\"", "text": "\"" } ] } ] }, { "type": "preproc_include", "children": [ { "type": "#include", "text": "#include" }, { "type": "system_lib_string", "text": "" } ] }, { "type": "comment", "text": "// Component Constants\r" }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "EXTRUDER_COMPONENT_ID" }, { "type": "preproc_arg", "text": "760\r" } ] }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "EXTRUDER_COMPONENT_NAME" }, { "type": "preproc_arg", "text": "\"Extruder\"\r" } ] }, { "type": "comment", "text": "// Speed Presets (in 0.01 Hz units for SAKO_VFD)\r" }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "EXTRUDER_SPEED_SLOW_HZ" }, { "type": "preproc_arg", "text": "10 // 10.00 Hz\r" } ] }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "EXTRUDER_SPEED_MEDIUM_HZ" }, { "type": "preproc_arg", "text": "25 // 25.00 Hz\r" } ] }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "EXTRUDER_SPEED_FAST_HZ" }, { "type": "preproc_arg", "text": "50 // 50.00 Hz (currently unused, but defined)\r" } ] }, { "type": "comment", "text": "// Speed POT Configuration for Extruding (multiplier for MEDIUM speed)\r" }, { "type": "comment", "text": "// POT value 0-100. Example: 0 maps to 0.5x, 50 maps to 1.0x, 100 maps to 1.5x MEDIUM speed.\r" }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "EXTRUDER_SPEED_POT_MIN_MULTIPLIER" }, { "type": "preproc_arg", "text": "0.5f\r" } ] }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "EXTRUDER_SPEED_POT_MAX_MULTIPLIER" }, { "type": "preproc_arg", "text": "1.5f\r" } ] }, { "type": "comment", "text": "// Overload POT Configuration and Jamming (using VFD Torque %)\r" }, { "type": "comment", "text": "// POT value 0-100. Maps to a torque threshold in percent (0-100).\r" }, { "type": "comment", "text": "// SAKO_VFD component now provides getTorque() returning 0-100.\r" }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "EXTRUDER_OVERLOAD_POT_MIN_TORQUE_PERCENT" }, { "type": "preproc_arg", "text": "50 // Example: 50% Torque\r" } ] }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "EXTRUDER_OVERLOAD_POT_MAX_TORQUE_PERCENT" }, { "type": "preproc_arg", "text": "95 // Example: 95% Torque\r" } ] }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "PLUNGER_JAMMED_DURATION_MS" }, { "type": "preproc_arg", "text": "2000 // Time torque must be above threshold to be JAMMED\r" } ] }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "EXTRUDER_VFD_READ_INTERVAL_MS" }, { "type": "preproc_arg", "text": "200 // How often to check VFD torque for jamming\r" } ] }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "EXTRUDER_AUTO_MODE_HOLD_DURATION_MS" }, { "type": "preproc_arg", "text": "2000 // Time joystick must be held for auto mode\r" } ] }, { "type": "comment", "text": "// Modbus Configuration\r" }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "EXTRUDER_MB_BASE_ADDRESS" }, { "type": "preproc_arg", "text": "EXTRUDER_COMPONENT_ID // Using component ID as base\r" } ] }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "EXTRUDER_MB_STATE_OFFSET" }, { "type": "preproc_arg", "text": "0\r" } ] }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "EXTRUDER_MB_COMMAND_OFFSET" }, { "type": "preproc_arg", "text": "1\r" } ] }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "EXTRUDER_MB_BLOCK_COUNT" }, { "type": "preproc_arg", "text": "2\r" } ] }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "EXTRUDER_MAX_RUN_TIME_MEDIUM_SPEED_MS" }, { "type": "preproc_arg", "text": "15000 // Max runtime at medium speed\r" } ] }, { "type": "enum_specifier", "children": [ { "type": "enum", "text": "enum" }, { "type": "class", "text": "class" }, { "type": "type_identifier", "text": "ExtruderModbusCommand" }, { "type": ":", "text": ":" }, { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "enumerator_list", "children": [ { "type": "{", "text": "{" }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "NO_COMMAND" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "0" } ] }, { "type": ",", "text": "," }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "CMD_EXTRUDE" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "2" } ] }, { "type": ",", "text": "," }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "CMD_STOP" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "3" } ] }, { "type": ",", "text": "," }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "CMD_INFO" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "4" } ] }, { "type": "}", "text": "}" } ] } ] }, { "type": ";", "text": ";" }, { "type": "comment", "text": "// Extruder States\r" }, { "type": "enum_specifier", "children": [ { "type": "enum", "text": "enum" }, { "type": "class", "text": "class" }, { "type": "type_identifier", "text": "ExtruderState" }, { "type": ":", "text": ":" }, { "type": "primitive_type", "text": "uint8_t" }, { "type": "enumerator_list", "children": [ { "type": "{", "text": "{" }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "IDLE" } ] }, { "type": ",", "text": "," }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "EXTRUDING_MANUAL" } ] }, { "type": ",", "text": "," }, { "type": "comment", "text": "// Joystick held UP, VFD forwarding, monitoring for auto-mode hold time\r" }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "EXTRUDING_AUTO" } ] }, { "type": ",", "text": "," }, { "type": "comment", "text": "// Auto-extruding after joystick hold, VFD forwarding\r" }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "STOPPING" } ] }, { "type": ",", "text": "," }, { "type": "comment", "text": "// Transition state to stop VFD\r" }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "JAMMED" } ] }, { "type": ",", "text": "," }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "RESETTING_JAM" } ] }, { "type": "comment", "text": "// State to handle reset after jam\r" }, { "type": "}", "text": "}" } ] } ] }, { "type": ";", "text": ";" }, { "type": "class_specifier", "children": [ { "type": "class", "text": "class" }, { "type": "type_identifier", "text": "Extruder" }, { "type": "base_class_clause", "children": [ { "type": ":", "text": ":" }, { "type": "access_specifier", "children": [ { "type": "public", "text": "public" } ] }, { "type": "type_identifier", "text": "Component" } ] }, { "type": "field_declaration_list", "children": [ { "type": "{", "text": "{" }, { "type": "access_specifier", "children": [ { "type": "public", "text": "public" } ] }, { "type": ":", "text": ":" }, { "type": "declaration", "children": [ { "type": "function_declarator", "children": [ { "type": "identifier", "text": "Extruder" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "Component" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "owner" } ] } ] }, { "type": ",", "text": "," }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "SAKO_VFD" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "vfd" } ] } ] }, { "type": ",", "text": "," }, { "type": "optional_parameter_declaration", "children": [ { "type": "type_identifier", "text": "Pos3Analog" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "joystick" } ] }, { "type": "=", "text": "=" }, { "type": "null", "children": [ { "type": "nullptr", "text": "nullptr" } ] } ] }, { "type": ",", "text": "," }, { "type": "optional_parameter_declaration", "children": [ { "type": "type_identifier", "text": "POT" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "speedPot" } ] }, { "type": "=", "text": "=" }, { "type": "null", "children": [ { "type": "nullptr", "text": "nullptr" } ] } ] }, { "type": ",", "text": "," }, { "type": "optional_parameter_declaration", "children": [ { "type": "type_identifier", "text": "POT" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "overloadPot" } ] }, { "type": "=", "text": "=" }, { "type": "null", "children": [ { "type": "nullptr", "text": "nullptr" } ] } ] }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "function_definition", "children": [ { "type": "function_declarator", "children": [ { "type": "destructor_name", "children": [ { "type": "~", "text": "~" }, { "type": "identifier", "text": "Extruder" } ] }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": "default_method_clause", "children": [ { "type": "=", "text": "=" }, { "type": "default", "text": "default" }, { "type": ";", "text": ";" } ] } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "setup" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "loop" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "info" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "debug" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "serial_register" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "Bridge" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "b" } ] } ] }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "init" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "reset" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "comment", "text": "// Modbus TCP Interface\r" }, { "type": "field_declaration", "children": [ { "type": "type_identifier", "text": "ModbusBlockView" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "mb_tcp_blocks" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] }, { "type": "type_qualifier", "children": [ { "type": "const", "text": "const" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "mb_tcp_register" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "ModbusTCP" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "mgr" } ] } ] }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "mb_tcp_read" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "MB_Registers" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "reg" } ] } ] }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "mb_tcp_write" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "MB_Registers" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "reg" } ] } ] }, { "type": ",", "text": "," }, { "type": "parameter_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "identifier", "text": "networkValue" } ] }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "comment", "text": "// Public commands for serial/external control\r" }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "cmd_extrude" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "cmd_stop" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "access_specifier", "children": [ { "type": "private", "text": "private" } ] }, { "type": ":", "text": ":" }, { "type": "field_declaration", "children": [ { "type": "type_identifier", "text": "SAKO_VFD" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "field_identifier", "text": "_vfd" } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "type_identifier", "text": "Pos3Analog" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "field_identifier", "text": "_joystick" } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "type_identifier", "text": "POT" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "field_identifier", "text": "_speedPot" } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "type_identifier", "text": "POT" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "field_identifier", "text": "_overloadPot" } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "type_identifier", "text": "ExtruderState" }, { "type": "field_identifier", "text": "_currentState" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "qualified_identifier", "children": [ { "type": "namespace_identifier", "text": "Pos3Analog" }, { "type": "::", "text": "::" }, { "type": "type_identifier", "text": "E_POS3_DIRECTION" } ] }, { "type": "field_identifier", "text": "_lastJoystickDirection" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "uint16_t" }, { "type": "field_identifier", "text": "_currentSpeedPotValue" }, { "type": ";", "text": ";" } ] }, { "type": "comment", "text": "// 0-100, defaults to 100 if pot is null\r" }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "uint16_t" }, { "type": "field_identifier", "text": "_currentOverloadPotValue" }, { "type": ";", "text": ";" } ] }, { "type": "comment", "text": "// 0-100, defaults to 100 if pot is null\r" }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "float" }, { "type": "field_identifier", "text": "_calculatedExtrudingSpeedHz" }, { "type": ";", "text": ";" } ] }, { "type": "comment", "text": "// Calculated speed for extruding (0.01Hz units)\r" }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "uint8_t" }, { "type": "field_identifier", "text": "_calculatedOverloadThresholdPercent" }, { "type": ";", "text": ";" } ] }, { "type": "comment", "text": "// Calculated torque threshold (0-100%)\r" }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "unsigned", "text": "unsigned" }, { "type": "long", "text": "long" } ] }, { "type": "field_identifier", "text": "_lastStateChangeTimeMs" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "unsigned", "text": "unsigned" }, { "type": "long", "text": "long" } ] }, { "type": "field_identifier", "text": "_jammedStartTimeMs" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "unsigned", "text": "unsigned" }, { "type": "long", "text": "long" } ] }, { "type": "field_identifier", "text": "_lastVfdReadTimeMs" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "unsigned", "text": "unsigned" }, { "type": "long", "text": "long" } ] }, { "type": "field_identifier", "text": "_joystickHoldStartTimeMs" }, { "type": ";", "text": ";" } ] }, { "type": "comment", "text": "// Timer for joystick hold duration\r" }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "field_identifier", "text": "_modbusCommandRegisterValue" }, { "type": ";", "text": ";" } ] }, { "type": "comment", "text": "// Holds the current value of the Modbus command register\r" }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "unsigned", "text": "unsigned" }, { "type": "long", "text": "long" } ] }, { "type": "field_identifier", "text": "_operationStartTimeMs" }, { "type": ";", "text": ";" } ] }, { "type": "comment", "text": "// Start time of current extrude operation\r" }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "unsigned", "text": "unsigned" }, { "type": "long", "text": "long" } ] }, { "type": "field_identifier", "text": "_currentMaxOperationTimeMs" }, { "type": ";", "text": ";" } ] }, { "type": "comment", "text": "// Calculated max duration for current operation\r" }, { "type": "comment", "text": "// Helper methods\r" }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "_handleIdleState" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "_handleExtrudingManualState" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "_handleExtrudingAutoState" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "_handleStoppingState" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "_handleJammedState" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "_handleResettingJamState" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "_updatePotValues" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "_checkVfdForJam" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "_transitionToState" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "ExtruderState" }, { "type": "identifier", "text": "newState" } ] }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "comment", "text": "// VFD interaction wrappers\r" }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "_vfdStartForward" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "primitive_type", "text": "uint16_t" }, { "type": "identifier", "text": "frequencyCentiHz" } ] }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "_vfdStartReverse" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "primitive_type", "text": "uint16_t" }, { "type": "identifier", "text": "frequencyCentiHz" } ] }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "_vfdStop" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "_vfdResetJam" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "}", "text": "}" } ] } ] }, { "type": ";", "text": ";" }, { "type": "#endif", "text": "#endif" } ] }, { "type": "comment", "text": "// PLUNGER_H " } ] }