aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/chelper.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-02-06 11:37:03 -0500
committerKevin O'Connor <kevin@koconnor.net>2017-02-06 12:17:50 -0500
commit19ed67331d7c957cc26f750b7d3cce23688753e4 (patch)
tree65c892f501734d11aaa048e0c9df84f2bb4829f0 /klippy/chelper.py
parent667b72870f122c5cb08a3abf7c692f824e24383c (diff)
downloadkutter-19ed67331d7c957cc26f750b7d3cce23688753e4.tar.gz
kutter-19ed67331d7c957cc26f750b7d3cce23688753e4.tar.xz
kutter-19ed67331d7c957cc26f750b7d3cce23688753e4.zip
stepcompress: Propagate errors back to python code
Propagate error codes back to the python code and raise an exception on an error. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/chelper.py')
-rw-r--r--klippy/chelper.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/klippy/chelper.py b/klippy/chelper.py
index f979e2c7..b7baf061 100644
--- a/klippy/chelper.py
+++ b/klippy/chelper.py
@@ -16,7 +16,7 @@ defs_stepcompress = """
, uint32_t queue_step_msgid, uint32_t set_next_step_dir_msgid
, uint32_t invert_sdir, uint32_t oid);
void stepcompress_free(struct stepcompress *sc);
- void stepcompress_push(struct stepcompress *sc, double step_clock
+ int stepcompress_push(struct stepcompress *sc, double step_clock
, int32_t sdir);
int32_t stepcompress_push_factor(struct stepcompress *sc
, double steps, double step_offset
@@ -32,16 +32,14 @@ defs_stepcompress = """
, double clock_offset, double dist, double start_pos
, double accel_multiplier, double step_dist, double height
, double closestxy_d, double closest_height2, double movez_r);
- void stepcompress_reset(struct stepcompress *sc, uint64_t last_step_clock);
- void stepcompress_set_homing(struct stepcompress *sc, uint64_t homing_clock);
- void stepcompress_queue_msg(struct stepcompress *sc
- , uint32_t *data, int len);
- uint32_t stepcompress_get_errors(struct stepcompress *sc);
+ int stepcompress_reset(struct stepcompress *sc, uint64_t last_step_clock);
+ int stepcompress_set_homing(struct stepcompress *sc, uint64_t homing_clock);
+ int stepcompress_queue_msg(struct stepcompress *sc, uint32_t *data, int len);
struct steppersync *steppersync_alloc(struct serialqueue *sq
, struct stepcompress **sc_list, int sc_num, int move_num);
void steppersync_free(struct steppersync *ss);
- void steppersync_flush(struct steppersync *ss, uint64_t move_clock);
+ int steppersync_flush(struct steppersync *ss, uint64_t move_clock);
"""
defs_serialqueue = """