grblHAL core  20241107
settings.c File Reference
#include <math.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <assert.h>
#include "hal.h"
#include "config.h"
#include "machine_limits.h"
#include "nvs_buffer.h"
#include "tool_change.h"
#include "state_machine.h"

Macros

#define AXIS_OPTS   { .subgroups = On, .increment = 1 }
 

Functions

bool settings_override_acceleration (uint8_t axis, float acceleration)
 
void settings_register (setting_details_t *details)
 
setting_details_tsettings_get_details (void)
 
setting_id_t settings_get_axis_base (setting_id_t id, uint_fast8_t *idx)
 
char * setting_get_value (const setting_detail_t *setting, uint_fast16_t offset)
 
uint32_t setting_get_int_value (const setting_detail_t *setting, uint_fast16_t offset)
 
float setting_get_float_value (const setting_detail_t *setting, uint_fast16_t offset)
 
void settings_write_build_info (char *line)
 
bool settings_read_build_info (char *line)
 
void settings_write_startup_line (uint8_t idx, char *line)
 
bool settings_read_startup_line (uint8_t idx, char *line)
 
void settings_write_coord_data (coord_system_id_t id, float(*coord_data)[N_AXIS])
 
bool settings_read_coord_data (coord_system_id_t id, float(*coord_data)[N_AXIS])
 
bool read_global_settings ()
 
void settings_write_global (void)
 
void settings_restore (settings_restore_t restore)
 
bool settings_is_group_available (setting_group_t id)
 
setting_group_t settings_normalize_group (setting_group_t group)
 
bool settings_iterator (const setting_detail_t *setting, setting_output_ptr callback, void *data)
 
const setting_detail_tsetting_get_details (setting_id_t id, setting_details_t **set)
 
const char * setting_get_description (setting_id_t id)
 
const setting_group_detail_tsetting_get_group_details (setting_group_t id)
 
setting_datatype_t setting_datatype_to_external (setting_datatype_t datatype)
 
bool setting_is_list (const setting_detail_t *setting)
 
bool setting_is_integer (const setting_detail_t *setting)
 
void setting_remove_elements (setting_id_t id, uint32_t mask)
 
status_code_t setting_validate_me (const setting_detail_t *setting, float value, char *svalue)
 
status_code_t setting_validate (setting_id_t id, float value, char *svalue)
 
status_code_t settings_store_setting (setting_id_t id, char *svalue)
 
bool settings_add_spindle_type (const char *type)
 
void settings_clear (void)
 
void settings_init (void)
 

Variables

settings_t settings
 
const settings_restore_t settings_all
 
PROGMEM const settings_t defaults
 

Macro Definition Documentation

◆ AXIS_OPTS

#define AXIS_OPTS   { .subgroups = On, .increment = 1 }

Function Documentation

◆ read_global_settings()

bool read_global_settings ( )

◆ setting_datatype_to_external()

setting_datatype_t setting_datatype_to_external ( setting_datatype_t  datatype)

◆ setting_get_description()

const char* setting_get_description ( setting_id_t  id)

◆ setting_get_details()

const setting_detail_t* setting_get_details ( setting_id_t  id,
setting_details_t **  set 
)

◆ setting_get_float_value()

float setting_get_float_value ( const setting_detail_t setting,
uint_fast16_t  offset 
)

◆ setting_get_group_details()

const setting_group_detail_t* setting_get_group_details ( setting_group_t  id)

◆ setting_get_int_value()

uint32_t setting_get_int_value ( const setting_detail_t setting,
uint_fast16_t  offset 
)

◆ setting_get_value()

char* setting_get_value ( const setting_detail_t setting,
uint_fast16_t  offset 
)

◆ setting_is_integer()

bool setting_is_integer ( const setting_detail_t setting)

◆ setting_is_list()

bool setting_is_list ( const setting_detail_t setting)

◆ setting_remove_elements()

void setting_remove_elements ( setting_id_t  id,
uint32_t  mask 
)

◆ setting_validate()

status_code_t setting_validate ( setting_id_t  id,
float  value,
char *  svalue 
)

◆ setting_validate_me()

status_code_t setting_validate_me ( const setting_detail_t setting,
float  value,
char *  svalue 
)

◆ settings_add_spindle_type()

bool settings_add_spindle_type ( const char *  type)

◆ settings_clear()

void settings_clear ( void  )

◆ settings_get_axis_base()

setting_id_t settings_get_axis_base ( setting_id_t  id,
uint_fast8_t *  idx 
)

◆ settings_get_details()

setting_details_t* settings_get_details ( void  )

◆ settings_init()

void settings_init ( void  )

◆ settings_is_group_available()

bool settings_is_group_available ( setting_group_t  id)

◆ settings_iterator()

bool settings_iterator ( const setting_detail_t setting,
setting_output_ptr  callback,
void *  data 
)

◆ settings_normalize_group()

setting_group_t settings_normalize_group ( setting_group_t  group)

◆ settings_override_acceleration()

bool settings_override_acceleration ( uint8_t  axis,
float  acceleration 
)

◆ settings_read_build_info()

bool settings_read_build_info ( char *  line)

◆ settings_read_coord_data()

bool settings_read_coord_data ( coord_system_id_t  id,
float(*)  coord_data[N_AXIS] 
)

◆ settings_read_startup_line()

bool settings_read_startup_line ( uint8_t  idx,
char *  line 
)

◆ settings_register()

void settings_register ( setting_details_t details)

◆ settings_restore()

void settings_restore ( settings_restore_t  restore)

◆ settings_store_setting()

status_code_t settings_store_setting ( setting_id_t  id,
char *  svalue 
)

◆ settings_write_build_info()

void settings_write_build_info ( char *  line)

◆ settings_write_coord_data()

void settings_write_coord_data ( coord_system_id_t  id,
float(*)  coord_data[N_AXIS] 
)

◆ settings_write_global()

void settings_write_global ( void  )

◆ settings_write_startup_line()

void settings_write_startup_line ( uint8_t  idx,
char *  line 
)

Variable Documentation

◆ acceleration

float acceleration[N_AXIS]

◆ defaults

PROGMEM const settings_t defaults

◆ settings

settings_t settings

◆ settings_all

const settings_restore_t settings_all
Initial value:
= {
}
#define SETTINGS_RESTORE_DRIVER_PARAMETERS
Default enabled. Set to Off or 0 to disable.
Definition: config.h:446
#define SETTINGS_RESTORE_STARTUP_LINES
Default enabled. Set to Off or 0 to disable.
Definition: config.h:440
#define SETTINGS_RESTORE_PARAMETERS
Default enabled. Set to Off or 0 to disable.
Definition: config.h:437
#define SETTINGS_RESTORE_BUILD_INFO
Default enabled. Set to Off or 0 to disable.
Definition: config.h:443
#define SETTINGS_RESTORE_DEFAULTS
Default enabled. Set to Off or 0 to disable.
Definition: config.h:434

◆ valid

bool valid