Umbau 12: Robot-Kinematics als extends RobotBase
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
const fs = require('fs');
|
||||
const https = require('https');
|
||||
const Robot = require('./robot/Robot');
|
||||
const { createRobotFromEnv } = require('./robot/KinematicsFactory');
|
||||
const GCode = require('./robot/GCode');
|
||||
const TelnetSender = require('./robot/TelnetSenderGRBL');
|
||||
|
||||
@@ -43,7 +43,7 @@ function createApp(options = {}) {
|
||||
fsModule = fs,
|
||||
httpsModule = https,
|
||||
processEnv = process.env,
|
||||
RobotClass = Robot,
|
||||
RobotClass = null,
|
||||
GCodeModule = GCode,
|
||||
TelnetSenderClass = TelnetSender,
|
||||
initInputWSFn = initInputWS,
|
||||
@@ -69,7 +69,13 @@ function createApp(options = {}) {
|
||||
|
||||
const httpsServer = httpsModule.createServer(httpsOptions);
|
||||
|
||||
const robot = new RobotClass(250, 264, 100);
|
||||
// Kinematik wählen: explizit injizierte RobotClass (Tests) hat Vorrang,
|
||||
// sonst per Umgebungsvariable (ROBOT_KINEMATICS / ROBOT_KINEMATICS_PARAMS).
|
||||
// Die Armlängen der Standard-Hardware dienen als Default, wenn keine Params
|
||||
// gesetzt sind — siehe doc/ToDo_12_InverseKinematikConfig_ROADMAP.md.
|
||||
const robot = RobotClass
|
||||
? new RobotClass(250, 264, 100)
|
||||
: createRobotFromEnv(processEnv, { l1: 250, l2: 264, l3: 100 });
|
||||
|
||||
const sharedState = {
|
||||
connectedClients: [],
|
||||
|
||||
Reference in New Issue
Block a user