void Robot::on_config_reload(void* argument){
if (this->arm_solution) delete this->arm_solution;
int solution_checksum = get_checksum(this->kernel->config->value(arm_solution_checksum)->by_default("cartesian")->as_string());
- switch(solution_checksum) {
- case rostock_checksum:
- this->arm_solution = new RostockSolution(this->kernel->config); break;
- case cartesian_checksum:
- default:
- this->arm_solution = new CartesianSolution(this->kernel->config); break;
- }
+
+ // Note checksums are not const expressions when in debug mode, so don't use switch
+ if(solution_checksum == rostock_checksum) {
+ this->arm_solution = new RostockSolution(this->kernel->config);
+
+ }else if(solution_checksum == delta_checksum) {
+ // place holder for now
+ this->arm_solution = new RostockSolution(this->kernel->config);
+
+ }else if(solution_checksum == cartesian_checksum) {
+ this->arm_solution = new CartesianSolution(this->kernel->config);
+
+ }else{
+ this->arm_solution = new CartesianSolution(this->kernel->config);
+ }
+
this->feed_rate = this->kernel->config->value(default_feed_rate_checksum )->by_default(100 )->as_number() / 60;
this->seek_rate = this->kernel->config->value(default_seek_rate_checksum )->by_default(100 )->as_number() / 60;