start configurator

This commit is contained in:
2025-02-27 22:46:51 +03:00
parent 70dec29f02
commit 943409c53e
14 changed files with 231 additions and 5 deletions

View File

@@ -230,6 +230,23 @@ static mcc_errcodes_t longcmd(long_command_t *cmd){
return MCC_E_OK;
}
mcc_errcodes_t get_hwconf(hardware_configuration_t *c){
if(!c) return MCC_E_BADFORMAT;
SSconfig conf;
if(!cmdC(&conf, FALSE)) return MCC_E_FAILED;
// and bored transformations
DBG("Xacc=%u", conf.Xconf.accel);
DBG("Yacc=%u", conf.Yconf.accel);
c->Xconf.accel = X_MOTACC2RS(conf.Xconf.accel);
DBG("cacc: %g", c->Xconf.accel);
c->Xconf.backlash = conf.Xconf.backlash;
// ...
c->Yconf.accel = X_MOTACC2RS(conf.Yconf.accel);
c->Xconf.backlash = conf.Xconf.backlash;
// ...
return MCC_E_OK;
}
// init mount class
mount_t Mount = {
.init = init,
@@ -242,4 +259,5 @@ mount_t Mount = {
.stop = stop,
.shortCmd = shortcmd,
.longCmd = longcmd,
.getHWconfig = get_hwconf,
};