feat: implement status monitoring, fault detection, and comms watchdog

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-11 19:20:23 +03:00
parent 73407b8272
commit 0c0883480d
11 changed files with 707 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
# Makefile for Ballu AC ESP32-C6 Controller
.PHONY: all build test clean test-uart test-midea-protocol test-zigbee-zcl test-integration-layer help
.PHONY: all build test clean test-uart test-midea-protocol test-zigbee-zcl test-integration-layer test-status-monitor help
# Directories
SRC_DIR := src
@@ -31,7 +31,7 @@ $(BUILD_DIR)/app: $(SRC_FILES)
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
# Build and run tests
test: test-uart test-midea-protocol test-zigbee-zcl test-integration-layer
test: test-uart test-midea-protocol test-zigbee-zcl test-integration-layer test-status-monitor
@echo "All tests passed!"
# Build individual test executables
@@ -51,6 +51,10 @@ $(TEST_DIR)/integration_layer_test: $(TEST_DIR)/integration_layer_test.c $(SRC_F
@mkdir -p $(BUILD_DIR)
$(CC) $(CFLAGS) $< $(SRC_FILES) $(UNITY_SRC) -o $@ $(LDFLAGS)
$(TEST_DIR)/status_monitor_test: $(TEST_DIR)/status_monitor_test.c $(SRC_FILES) $(UNITY_SRC)
@mkdir -p $(BUILD_DIR)
$(CC) $(CFLAGS) $< $(SRC_FILES) $(UNITY_SRC) -o $@ $(LDFLAGS)
# Run individual tests
test-uart: $(TEST_DIR)/uart_driver_test
@echo "Running UART driver tests..."
@@ -68,6 +72,10 @@ test-integration-layer: $(TEST_DIR)/integration_layer_test
@echo "Running integration layer tests..."
@./$(TEST_DIR)/integration_layer_test
test-status-monitor: $(TEST_DIR)/status_monitor_test
@echo "Running status monitor tests..."
@./$(TEST_DIR)/status_monitor_test
# Clean build artifacts
clean:
rm -rf $(BUILD_DIR)