Minor changes
This commit is contained in:
parent
14fb3d84a5
commit
27ca86d650
|
@ -214,7 +214,7 @@ namespace ratgdo {
|
||||||
void RATGDOComponent::received(const ObstructionState obstruction_state)
|
void RATGDOComponent::received(const ObstructionState obstruction_state)
|
||||||
{
|
{
|
||||||
if (this->obstruction_from_status_) {
|
if (this->obstruction_from_status_) {
|
||||||
ESP_LOGD(TAG, "Obstruction: state=%s", ObstructionState_to_string(*this->obstruction_state));
|
ESP_LOGD(TAG, "Obstruction: state=%s", ObstructionState_to_string(obstruction_state));
|
||||||
|
|
||||||
this->obstruction_state = obstruction_state;
|
this->obstruction_state = obstruction_state;
|
||||||
// This isn't very fast to update, but its still better
|
// This isn't very fast to update, but its still better
|
||||||
|
@ -225,19 +225,19 @@ namespace ratgdo {
|
||||||
|
|
||||||
void RATGDOComponent::received(const MotorState motor_state)
|
void RATGDOComponent::received(const MotorState motor_state)
|
||||||
{
|
{
|
||||||
ESP_LOGD(TAG, "Motor: state=%s", MotorState_to_string(*this->motor_state));
|
ESP_LOGD(TAG, "Motor: state=%s", MotorState_to_string(motor_state));
|
||||||
this->motor_state = motor_state;
|
this->motor_state = motor_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RATGDOComponent::received(const ButtonState button_state)
|
void RATGDOComponent::received(const ButtonState button_state)
|
||||||
{
|
{
|
||||||
ESP_LOGD(TAG, "Button state=%s", ButtonState_to_string(*this->button_state));
|
ESP_LOGD(TAG, "Button state=%s", ButtonState_to_string(button_state));
|
||||||
this->button_state = button_state;
|
this->button_state = button_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RATGDOComponent::received(const MotionState motion_state)
|
void RATGDOComponent::received(const MotionState motion_state)
|
||||||
{
|
{
|
||||||
ESP_LOGD(TAG, "Motion: %s", MotionState_to_string(*this->motion_state));
|
ESP_LOGD(TAG, "Motion: %s", MotionState_to_string(motion_state));
|
||||||
this->motion_state = motion_state;
|
this->motion_state = motion_state;
|
||||||
if (motion_state == MotionState::DETECTED) {
|
if (motion_state == MotionState::DETECTED) {
|
||||||
this->set_timeout("clear_motion", 3000, [=] {
|
this->set_timeout("clear_motion", 3000, [=] {
|
||||||
|
|
|
@ -276,7 +276,7 @@ namespace ratgdo {
|
||||||
|
|
||||||
// if we are at the start of a message, capture the next 16 bytes
|
// if we are at the start of a message, capture the next 16 bytes
|
||||||
if (msg_start == 0x550100) {
|
if (msg_start == 0x550100) {
|
||||||
ESP_LOG1(TAG, "Baud: %d", this->sw_serial_.baudRate());
|
ESP_LOGV(TAG, "Baud: %d", this->sw_serial_.baudRate());
|
||||||
rx_packet[0] = 0x55;
|
rx_packet[0] = 0x55;
|
||||||
rx_packet[1] = 0x01;
|
rx_packet[1] = 0x01;
|
||||||
rx_packet[2] = 0x00;
|
rx_packet[2] = 0x00;
|
||||||
|
@ -317,7 +317,7 @@ namespace ratgdo {
|
||||||
|
|
||||||
void Secplus2::print_packet(const char* prefix, const WirePacket& packet) const
|
void Secplus2::print_packet(const char* prefix, const WirePacket& packet) const
|
||||||
{
|
{
|
||||||
ESP_LOG2(TAG, "%s: [%02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X]",
|
ESP_LOGV(TAG, "%s: [%02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X]",
|
||||||
prefix,
|
prefix,
|
||||||
packet[0],
|
packet[0],
|
||||||
packet[1],
|
packet[1],
|
||||||
|
|
Loading…
Reference in New Issue