yarf 0.1
Yet Another RepRap Firmware
|
00001 /* 00002 * commands.h 00003 * 00004 * Copyright 2011 Pieter Agten 00005 * 00006 * This file is part of Yarf. 00007 * 00008 * Yarf is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation, either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * Yarf is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with Yarf. If not, see <http://www.gnu.org/licenses/>. 00020 */ 00021 00029 #ifndef COMMANDS_H 00030 #define COMMANDS_H 00031 00032 #include <stdio.h> 00033 #include <stdbool.h> 00034 00038 enum cmd_status { 00039 OK, 00040 INVALID, 00041 FAULT 00042 }; 00043 00047 typedef struct { 00048 enum cmd_status status; 00049 float T; 00050 float B; 00051 float X; 00052 float Y; 00053 float Z; 00054 float E; 00055 char *info; 00056 } cmd_response_t; 00057 00058 00062 void cmd_init(void); 00063 00079 void cmd_controlled_move(cmd_response_t *r, float x, float y, float z, float e, float f); 00080 00089 void cmd_set_units_inches(cmd_response_t *r); 00090 00098 void cmd_set_units_millimeters(cmd_response_t *r); 00099 00110 void cmd_move_to_origin(cmd_response_t *r, bool x, bool y, bool z); 00111 00116 void cmd_set_absolute_positioning(cmd_response_t *r); 00117 00123 void cmd_set_relative_positioning(cmd_response_t *r); 00124 00138 void cmd_set_position(cmd_response_t *r, float x, float y, float z, float e); 00139 00148 void cmd_stop_idle_hold(cmd_response_t *r); 00149 00162 void cmd_set_extruder_temp_async(cmd_response_t *r, float c); 00163 00172 void cmd_read_nozzle_and_printbed_temp(cmd_response_t *r); 00173 00186 void cmd_set_extruder_temp_sync(cmd_response_t *r, float c); 00187 00198 void cmd_set_extruder_pwm(cmd_response_t *r, float s); 00199 00207 void cmd_get_position(cmd_response_t *r); 00208 00216 void cmd_wait(cmd_response_t *r); 00217 00229 void cmd_set_printbed_temp_async(cmd_response_t *r, float c); 00230 00241 void cmd_select_tool(cmd_response_t *r, int tool); 00242 00243 00244 00245 #endif //COMMANDS_H