Added settings descriptions, map files cleanup

This commit is contained in:
Terje Io 2021-08-20 18:58:18 +02:00
parent a79606bf29
commit 9e2aae2578
4 changed files with 57 additions and 2 deletions

View File

@ -37,11 +37,12 @@
#endif
// Board has 2K FRAM
/* supply problems...
#undef EEPROM_ENABLE
#undef EEPROM_IS_FRAM
#define EEPROM_ENABLE 1
#define EEPROM_IS_FRAM 1
*/
#define X_STEP_PIN (2u)
#define X_DIRECTION_PIN (3u)
#define X_ENABLE_PIN (10u)

View File

@ -195,6 +195,43 @@ PROGMEM static const setting_detail_t ethernet_settings[] = {
{ Setting_WebSocketPort, Group_Networking, "Websocket port", NULL, Format_Int16, "####0", "1", "65535", Setting_NonCore, &ethernet.websocket_port, NULL, NULL }
};
#ifndef NO_SETTINGS_DESCRIPTIONS
static const setting_descr_t ethernet_settings_descr[] = {
{ Setting_NetworkServices, "Network services to enable. Consult driver documentation for availability.\\n\\n"
"NOTE: A hard reset of the controller is required after changing network settings."
},
{ Setting_Hostname, "Network hostname.\\n\\n"
"NOTE: A hard reset of the controller is required after changing network settings."
},
{ Setting_IpMode, "IP Mode.\\n\\n"
"NOTE: A hard reset of the controller is required after changing network settings."
},
{ Setting_IpAddress, "Static IP address.\\n\\n"
"NOTE: A hard reset of the controller is required after changing network settings."
},
{ Setting_Gateway, "Static gateway address.\\n\\n"
"NOTE: A hard reset of the controller is required after changing network settings."
},
{ Setting_NetMask, "Static netmask.\\n\\n"
"NOTE: A hard reset of the controller is required after changing network settings."
},
{ Setting_TelnetPort, "(Raw) Telnet port number listening for incoming connections.\\n\\n"
"NOTE: A hard reset of the controller is required after changing network settings."
},
#if HTTP_ENABLE
{ Setting_HttpPort, "HTTP port number listening for incoming connections.\\n\\n"
"NOTE: A hard reset of the controller is required after changing network settings."
},
#endif
{ Setting_WebSocketPort, "Websocket port number listening for incoming connections.\\n\\n"
"NOTE: A hard reset of the controller is required after changing network settings.\\n"
"NOTE: WebUI requires this to be HTTP port number + 1."
}
};
#endif
static void ethernet_settings_save (void)
{
hal.nvs.memcpy_to_nvs(nvs_address, (uint8_t *)&ethernet, sizeof(network_settings_t), true);
@ -205,6 +242,10 @@ static setting_details_t details = {
.n_groups = sizeof(ethernet_groups) / sizeof(setting_group_detail_t),
.settings = ethernet_settings,
.n_settings = sizeof(ethernet_settings) / sizeof(setting_detail_t),
#ifndef NO_SETTINGS_DESCRIPTIONS
.descriptions = ethernet_settings_descr,
.n_descriptions = sizeof(ethernet_settings_descr) / sizeof(setting_descr_t),
#endif
.save = ethernet_settings_save,
.load = ethernet_settings_load,
.restore = ethernet_settings_restore

View File

@ -54,11 +54,24 @@ static const setting_detail_t aux_settings[] = {
{ Settings_IoPort_InvertOut, Group_AuxPorts, "Invert I/O Port outputs", NULL, Format_Bitfield, output_ports, NULL, NULL, Setting_NonCoreFn, aux_set_invert_out, aux_get_invert_out, is_setting_available },
};
#ifndef NO_SETTINGS_DESCRIPTIONS
static const setting_descr_t aux_settings_descr[] = {
{ Settings_IoPort_InvertIn, "Invert IOPort inputs." },
{ Settings_IoPort_InvertOut, "Invert IOPort output." },
};
#endif
static setting_details_t details = {
.groups = aux_groups,
.n_groups = sizeof(aux_groups) / sizeof(setting_group_detail_t),
.settings = aux_settings,
.n_settings = sizeof(aux_settings) / sizeof(setting_detail_t),
#ifndef NO_SETTINGS_DESCRIPTIONS
.descriptions = aux_settings_descr,
.n_descriptions = sizeof(aux_settings_descr) / sizeof(setting_descr_t),
#endif
.load = aux_settings_load,
.save = settings_write_global
};

View File

@ -49,7 +49,7 @@ N_AXIS has a default value of 3, edit grbl\config.h to increase.
*/
//#define USB_SERIAL_CDC 2 // 1 for Arduino class library and 2 for PJRC C library. Comment out to use UART communication.
#define USB_SERIAL_CDC 2 // 1 for Arduino class library and 2 for PJRC C library. Comment out to use UART communication.
//#define USB_SERIAL_WAIT 1 // Wait for USB connection before starting grblHAL.
//#define BLUETOOTH_ENABLE 1 // Set to 1 for HC-05 module. Requires Bluetooth plugin.
//#define SPINDLE_HUANYANG 1 // Set to 1 or 2 for Huanyang VFD spindle. Requires spindle plugin.