mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-10-26 07:46:11 +01:00
stepcompress: Pass oid in stepcompress_fill() instead of stepcompress_alloc()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -36,9 +36,10 @@ defs_stepcompress = """
|
||||
int step_count, interval, add;
|
||||
};
|
||||
|
||||
struct stepcompress *stepcompress_alloc(uint32_t oid, char name[16]);
|
||||
void stepcompress_fill(struct stepcompress *sc, uint32_t max_error
|
||||
, int32_t queue_step_msgtag, int32_t set_next_step_dir_msgtag);
|
||||
struct stepcompress *stepcompress_alloc(char name[16]);
|
||||
void stepcompress_fill(struct stepcompress *sc, uint32_t oid
|
||||
, uint32_t max_error, int32_t queue_step_msgtag
|
||||
, int32_t set_next_step_dir_msgtag);
|
||||
void stepcompress_set_invert_sdir(struct stepcompress *sc
|
||||
, uint32_t invert_sdir);
|
||||
void stepcompress_free(struct stepcompress *sc);
|
||||
|
||||
@@ -258,13 +258,12 @@ static void sc_thread_free(struct stepcompress *sc);
|
||||
|
||||
// Allocate a new 'stepcompress' object
|
||||
struct stepcompress * __visible
|
||||
stepcompress_alloc(uint32_t oid, char name[16])
|
||||
stepcompress_alloc(char name[16])
|
||||
{
|
||||
struct stepcompress *sc = malloc(sizeof(*sc));
|
||||
memset(sc, 0, sizeof(*sc));
|
||||
list_init(&sc->msg_queue);
|
||||
list_init(&sc->history_list);
|
||||
sc->oid = oid;
|
||||
sc->sdir = -1;
|
||||
|
||||
int ret = sc_thread_alloc(sc, name);
|
||||
@@ -275,9 +274,10 @@ stepcompress_alloc(uint32_t oid, char name[16])
|
||||
|
||||
// Fill message id information
|
||||
void __visible
|
||||
stepcompress_fill(struct stepcompress *sc, uint32_t max_error
|
||||
stepcompress_fill(struct stepcompress *sc, uint32_t oid, uint32_t max_error
|
||||
, int32_t queue_step_msgtag, int32_t set_next_step_dir_msgtag)
|
||||
{
|
||||
sc->oid = oid;
|
||||
sc->max_error = max_error;
|
||||
sc->queue_step_msgtag = queue_step_msgtag;
|
||||
sc->set_next_step_dir_msgtag = set_next_step_dir_msgtag;
|
||||
|
||||
@@ -11,8 +11,8 @@ struct pull_history_steps {
|
||||
int step_count, interval, add;
|
||||
};
|
||||
|
||||
struct stepcompress *stepcompress_alloc(uint32_t oid, char name[16]);
|
||||
void stepcompress_fill(struct stepcompress *sc, uint32_t max_error
|
||||
struct stepcompress *stepcompress_alloc(char name[16]);
|
||||
void stepcompress_fill(struct stepcompress *sc, uint32_t oid, uint32_t max_error
|
||||
, int32_t queue_step_msgtag
|
||||
, int32_t set_next_step_dir_msgtag);
|
||||
void stepcompress_set_invert_sdir(struct stepcompress *sc
|
||||
|
||||
Reference in New Issue
Block a user