- sm_SPS 이벤트 핸들러에서 장치 연결 및 상태 전송을 비동기로 처리
- DeviceConnectionWorker 스레드로 장치 연결 분리
- SPS(1초), Running(2초) 타임아웃 보호 추가
- 상태머신 모니터링 디버그 창 추가 (fStateMachineDebug)
- F11/F12 단축키로 스레드 덤프 및 디버그 브레이크 지원
- RaiseMessage 이벤트 비동기 처리로 로그 블로킹 방지
상태머신에서 장치 연결(AGV, XBee, BMS)이 메인 루프를 블로킹하는 문제 해결
주요 변경사항:
- DeviceConnectionWorker: 별도 쓰레드에서 장치 연결 처리
- StartDeviceConnectionThread: 쓰레드 시작 로직
- StopDeviceConnectionThread: 프로그램 종료 시 안전한 쓰레드 종료
- sm_SPS: 연결 로직 제거, 쓰레드 시작만 담당
- __Closing: 프로그램 종료 시 쓰레드 종료 호출
이점:
- 장치 연결 중 상태머신 블로킹 방지
- 1초 간격으로 비동기 연결 시도
- 프로그램 종료 시 안전한 쓰레드 정리
파일:
- StateMachine/_SPS.cs: 쓰레드 로직 추가
- fMain.cs: 종료 시 쓰레드 정리
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 맵 에디터 메인폼 UI 개선
- AGV 캔버스 컨트롤 수정
- 설정 파일 업데이트
- 상태머신 AGV 로직 조정
- 자동 모드 화면 개선
- 메인폼 디자이너 및 로직 수정
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
## 신규 기능
- ACS(중앙제어시스템) 시뮬레이터 프로젝트 생성
- 8가지 AGV 제어 명령어 지원:
* SetCurrent: 현재 위치 설정
* Goto: RFID 이동
* GotoAlias: 별칭 이동 (v1.1.0)
* Stop: 정지
* Reset: 에러 리셋
* Manual: 수동 제어
* MarkStop: 마크센서 정지
* LiftControl: 리프트 제어
## AGV 상태 실시간 표시 (v1.3.0)
- AGV 상태 그룹박스 추가 (8가지 상태 정보)
- Status 메시지(cmd=3) 자동 수신 및 UI 업데이트
- 상태별 색상 표시로 직관적 모니터링
## 설정 관리
- 실행 폴더에 JSON 형식 설정 파일 저장 (v1.4.0)
- COM 포트, 보레이트, RFID, 별칭, AGV 선택 자동 저장
- 설정 파일 직접 편집 가능
## 기술 스택
- .NET Framework 4.8
- ENIGProtocol 프로젝트 참조
- RS232/Xbee 통신
- Newtonsoft.Json
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add motor/magnet/speed enums and AGVCommand class for AGV control
- Implement Predict() method for next action prediction based on path and state
- Add RFID position tracking (requires 2 RFIDs for position confirmation)
- Add SetPath() method to VirtualAGV for path management
- Implement GetCommandFromPath() to extract motor/magnet/speed from DetailedPath
- Add real-time prediction display in SimulatorForm (timer1_Tick)
- Support automatic forward movement at low speed when position unconfirmed
- Support stop command when destination reached or no destination set
Key Features:
- Position unconfirmed (RFID < 2): Forward + Straight + Low speed
- Position confirmed + no destination: Stop (position found)
- Position confirmed + destination reached: Stop (arrived)
- Path execution: Motor/Magnet/Speed from DetailedPath NodeMotorInfo
- Rotation nodes: Automatic low speed
- Junction handling: Magnet direction (Left/Right/Straight)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>