Skip to content

Commit

Permalink
Change char to str
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Oct 10, 2024
1 parent fe13bdd commit 2976130
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions components/tc_bus/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,21 +341,21 @@ namespace esphome
return data;
}

Model string_to_model(char* str)
Model string_to_model(std::string str)
{
//if (str == "ISH_3030") return MODEL_ISH_3030;

return MODEL_NONE;
}

SettingType string_to_setting_type(char* str)
SettingType string_to_setting_type(std::string str)
{
//if (str == "ringtone_door_call") return SETTING_RINGTONE_DOOR_CALL;

return SETTING_RINGTONE_DOOR_CALL;
}

CommandType string_to_command_type(char* str)
CommandType string_to_command_type(std::string str)
{
/*if (str == "DOOR_CALL") return COMMAND_TYPE_DOOR_CALL;
if (str == "FLOOR_CALL") return COMMAND_TYPE_FLOOR_CALL;
Expand Down
6 changes: 3 additions & 3 deletions components/tc_bus/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ namespace esphome
CommandData parseCommand(uint32_t command);

const char* command_type_to_string(CommandType type);
CommandType string_to_command_type(char* str);
CommandType string_to_command_type(std::string str);

const char* setting_type_to_string(SettingType type);
SettingType string_to_setting_type(char* str);
SettingType string_to_setting_type(std::string str);

const char* model_to_string(Model model);
Model string_to_model(char* str);
Model string_to_model(std::string str);

} // namespace tc_bus
} // namespace esphome

0 comments on commit 2976130

Please sign in to comment.