mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-10 00:45:23 +00:00
cosmetic changes only, fixing compilation warnings
This commit is contained in:
@ -177,7 +177,7 @@ cJSON* hass_build_device_node(cJSON* ids) {
|
||||
/// @param payload_on The payload that represents enabled state. This is not added for POWER_SENSOR.
|
||||
/// @param payload_off The payload that represents disabled state. This is not added for POWER_SENSOR.
|
||||
/// @return
|
||||
HassDeviceInfo* hass_init_device_info(ENTITY_TYPE type, int index, char* payload_on, char* payload_off) {
|
||||
HassDeviceInfo* hass_init_device_info(ENTITY_TYPE type, int index, const char* payload_on, const char* payload_off) {
|
||||
HassDeviceInfo* info = os_malloc(sizeof(HassDeviceInfo));
|
||||
addLogAdv(LOG_DEBUG, LOG_FEATURE_HASS, "hass_init_device_info=%p", info);
|
||||
|
||||
|
||||
@ -94,7 +94,7 @@ typedef struct HassDeviceInfo_s {
|
||||
|
||||
void hass_print_unique_id(http_request_t* request, const char* fmt, ENTITY_TYPE type, int index);
|
||||
HassDeviceInfo* hass_init_relay_device_info(int index, ENTITY_TYPE type, bool bInverse);
|
||||
HassDeviceInfo* hass_init_device_info(ENTITY_TYPE type, int index, char* payload_on, char* payload_off);
|
||||
HassDeviceInfo* hass_init_device_info(ENTITY_TYPE type, int index, const char* payload_on, const char* payload_off);
|
||||
HassDeviceInfo* hass_init_light_device_info(ENTITY_TYPE type);
|
||||
HassDeviceInfo* hass_init_power_sensor_device_info(int index);
|
||||
HassDeviceInfo* hass_init_light_singleColor_onChannels(int toggle, int dimmer, int brightness_scale);
|
||||
|
||||
@ -917,6 +917,9 @@ typedef enum {
|
||||
|
||||
} RESET_SOURCE_STATUS;
|
||||
*/
|
||||
|
||||
int bk_misc_get_start_type();
|
||||
|
||||
{
|
||||
const char* s = "Unk";
|
||||
i = bk_misc_get_start_type();
|
||||
@ -1065,7 +1068,6 @@ int http_fn_cfg_mqtt(http_request_t* request) {
|
||||
int http_fn_cfg_ip(http_request_t* request) {
|
||||
char tmp[64];
|
||||
int g_changes = 0;
|
||||
byte ip[4];
|
||||
http_setup(request, httpMimeTypeHTML);
|
||||
http_html_start(request, "IP");
|
||||
poststr_h2(request, "Here you can set static IP or DHCP");
|
||||
|
||||
@ -665,14 +665,14 @@ static int http_rest_get_pins(http_request_t* request) {
|
||||
// TODO: maybe we should cull futher channels that are not used?
|
||||
// I support many channels because I plan to use 16x relays module with I2C MCP23017 driver
|
||||
poststr(request, "],\"channels\":[");
|
||||
for (i = 0; i < CHANNEL_MAX; i++) {
|
||||
for (i = 0; i < PLATFORM_GPIO_MAX; i++) {
|
||||
if (i) {
|
||||
hprintf255(request, ",");
|
||||
}
|
||||
hprintf255(request, "%d", g_cfg.pins.channels[i]);
|
||||
}
|
||||
poststr(request, "],\"states\":[");
|
||||
for (i = 0; i < CHANNEL_MAX; i++) {
|
||||
for (i = 0; i < PLATFORM_GPIO_MAX; i++) {
|
||||
if (i) {
|
||||
hprintf255(request, ",");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user