Marks a global parameter as persistent or non-persistent.
Global parameters whose names start with an underscore (_) can be made persistent.
This function takes a parameter name and an bool flag indicating whether to add or remove the parameter from the persistent storage.
If the parameter name does not start with an underscore or is empty, the function returns False (indicating it is not persistent).
planetcnc.param_persistent(name, add)
#! /usr/bin/env python import planetcnc # Mark a parameter as persistent. result = planetcnc.param_persistent("_machine_speed", 1) if result: print("Parameter '_machine_speed' is now persistent.") else: print("Failed to mark parameter as persistent.") # Later, remove the persistence. result = planetcnc.param_persistent("_machine_speed", 0) if result: print("Parameter '_machine_speed' persistence removed.") else: print("Parameter was not persistent.");