diff --git a/g2core/config.cpp b/g2core/config.cpp index 3018968d..d5bb4e42 100644 --- a/g2core/config.cpp +++ b/g2core/config.cpp @@ -238,6 +238,7 @@ stat_t get_flt(nvObj_t *nv) } /* Generic sets() + * set_noop() - set nothing and return OK * set_nul() - set nothing, return OK * set_ro() - set nothing, return read-only error * set_ui8() - set value as 8 bit uint8_t value @@ -250,8 +251,15 @@ stat_t get_flt(nvObj_t *nv) * set_flt() - set value as float */ +stat_t set_noop(nvObj_t *nv) { + nv->valuetype = TYPE_NULL; + return (STAT_OK); // hack until JSON is refactored +} + stat_t set_nul(nvObj_t *nv) { - return (STAT_OK); +// nv->valuetype = TYPE_NULL; +// return (STAT_PARAMETER_IS_READ_ONLY); // this is what it should be + return (STAT_OK); // hack until JSON is refactored } stat_t set_ro(nvObj_t *nv) { diff --git a/g2core/config.h b/g2core/config.h index 3100d707..0dbe2607 100644 --- a/g2core/config.h +++ b/g2core/config.h @@ -2,7 +2,7 @@ * config.h - configuration sub-system generic part (see config_app for application part) * This file is part of the g2core project * - * Copyright (c) 2010 - 2016 Alden S. Hart, Jr. + * Copyright (c) 2010 - 2017 Alden S. Hart, Jr. * * This file ("the software") is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2 as published by the @@ -317,6 +317,7 @@ bool nv_index_lt_groups(index_t index); // (see config_app.c) bool nv_group_is_prefixed(char *group); // generic internal functions and accessors +stat_t set_noop(nvObj_t *nv); // set nothing and return OK stat_t set_nul(nvObj_t *nv); // set nothing, return OK stat_t set_ro(nvObj_t *nv); // set nothing, return read-only error stat_t set_ui8(nvObj_t *nv); // set uint8_t value diff --git a/g2core/config_app.cpp b/g2core/config_app.cpp index d1081734..3934cfca 100644 --- a/g2core/config_app.cpp +++ b/g2core/config_app.cpp @@ -2,8 +2,8 @@ * config_app.cpp - application-specific part of configuration data * This file is part of the g2core project * - * Copyright (c) 2013 - 2016 Alden S. Hart, Jr. - * Copyright (c) 2016 Robert Giseburt + * Copyright (c) 2013 - 2017 Alden S. Hart, Jr. + * Copyright (c) 2016 - 2017 Robert Giseburt * * This file ("the software") is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2 as published by the @@ -113,9 +113,7 @@ const cfgItem_t cfgArray[] = { // dynamic model attributes for reporting purposes (up front for speed) { "", "stat",_f0, 0, cm_print_stat, cm_get_stat, set_ro, (float *)&cs.null, 0 }, // combined machine state -// { "", "n", _fi, 0, cm_print_line, cm_get_mline,set_ro, (float *)&cm.gm.linenum,0 }, // Model line number -// { "", "line",_fi, 0, cm_print_line, cm_get_line, set_ro, (float *)&cm.gm.linenum,0 }, // Active line number - model or runtime line number - { "", "n", _fi, 0, cm_print_line, cm_get_mline,set_ro, (float *)&cs.null, 0 }, // Model line number + { "", "n", _fi, 0, cm_print_line, cm_get_mline,set_noop,(float *)&cs.null, 0 }, // Model line number { "", "line",_fi, 0, cm_print_line, cm_get_line, set_ro, (float *)&cs.null, 0 }, // Active line number - model or runtime line number { "", "vel", _f0, 2, cm_print_vel, cm_get_vel, set_ro, (float *)&cs.null, 0 }, // current velocity { "", "feed",_f0, 2, cm_print_feed, cm_get_feed, set_ro, (float *)&cs.null, 0 }, // feed rate diff --git a/g2core/plan_exec.cpp b/g2core/plan_exec.cpp index 719308b5..05d86c66 100644 --- a/g2core/plan_exec.cpp +++ b/g2core/plan_exec.cpp @@ -2,8 +2,8 @@ * plan_exec.cpp - execution function for acceleration managed lines * This file is part of the g2core project * - * Copyright (c) 2010 - 2016 Alden S. Hart, Jr. - * Copyright (c) 2012 - 2016 Rob Giseburt + * Copyright (c) 2010 - 2017 Alden S. Hart, Jr. + * Copyright (c) 2012 - 2017 Rob Giseburt * * This file ("the software") is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2 as published by the diff --git a/g2core/plan_line.cpp b/g2core/plan_line.cpp index ff14195c..ab00ce8c 100644 --- a/g2core/plan_line.cpp +++ b/g2core/plan_line.cpp @@ -2,8 +2,8 @@ * plan_line.c - acceleration managed line planning and motion execution * This file is part of the g2core project * - * Copyright (c) 2010 - 2016 Alden S. Hart, Jr. - * Copyright (c) 2012 - 2016 Rob Giseburt + * Copyright (c) 2010 - 2017 Alden S. Hart, Jr. + * Copyright (c) 2012 - 2017 Rob Giseburt * * This file ("the software") is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2 as published by the