SourceCode/Bond/Servo/CPageGraph1.h
@@ -2,6 +2,11 @@
#include "ServoGraph.h"
#include "ServoCommo.h"
namespace SERVO {
   class CEquipment;
   class CGlass;
}
enum DeviceStatus {
   ONLINE,       // 在线
   OFFLINE,      // 离线
@@ -34,8 +39,16 @@
   void RotateRobot(float angleInDegrees);
   void BindEquipmentToGraph();
   void MoveRobotToPosition(SERVO::ROBOT_POSITION position);
   void StartRobotMoveToPosition(SERVO::ROBOT_POSITION position);
   POINT LoadArmOffset(const std::string& armName);
   void SaveArmOffset(const std::string& armName, const POINT& pt);
   void UpdateSlotBars();
   void BuildSlotColors(SERVO::CEquipment* pEq, std::vector<COLORREF>& colors);
   COLORREF GetSlotColor(SERVO::CGlass* pGlass, BOOL isProcessing);
   void ApplySlotBarTestPattern(int mode);
   void UpdateLegendPosition();
private:
   IObserver* m_pObserver;
@@ -43,10 +56,37 @@
   BOOL m_bIsRobotMoving;
   COLORREF m_crBkgnd;
   HBRUSH m_hbrBkgnd;
   int m_slotBarTestMode;
   // ===== 机器人动画相关成员变量 =====
   // 动画目标位置(机器人目标位置枚举)
   SERVO::ROBOT_POSITION m_targetRobotPosition;
   // 动画起始和目标 X 坐标(水平位移)
   int m_nRobotMoveStartX;
   int m_nRobotMoveEndX;
   // 动画步数控制(总步数 & 当前步)
   int m_nRobotMoveSteps;          // 动画总步数(控制动画速度)
   int m_nRobotMoveCurrentStep;    // 当前动画步数进度
   // 动画起始和目标角度(旋转角度,单位:度)
   float m_nRobotMoveStartAngle;   // 起始角度
   float m_nRobotMoveEndAngle;     // 目标角度(旋转角度)
   // ===== 机器人状态相关成员变量 =====
   // 上一次已完成的位置(用于判断是否需要移动)
   SERVO::ROBOT_POSITION m_lastRobotPosition;
   // 上一次已更新的机器人 ARM 占用状态(两个机械臂)
   BOOL m_lastArmState[2];
   POINT m_arm1Offset; // ARM1 从中心向左47, 向上33
   POINT m_arm2Offset; // ARM2 从中心向右10, 向上33
   // 两个机械臂相对于机器人中心的偏移(像素坐标)
   POINT m_arm1Offset;
   POINT m_arm2Offset;
// 对话框数据
#ifdef AFX_DESIGN_TIME