mirror of
https://github.com/synthetos/g2.git
synced 2026-09-20 17:55:43 +08:00
Fixed regression for JSON wrapped code where ’n’ is reported (was failing on read-only)
This commit is contained in:
+9
-1
@@ -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) {
|
||||
|
||||
+2
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user