void fATWO(void *arg){ int argc = 0; char *argv[MAX_ARGC] = {0}; printf("[ATWO]: _AT_WLAN_OTA_UPDATE_\n\r"); if(!arg){ printf("[ATWO]Usage: ATWO=IP[PORT] or ATWO= REPOSITORY[FILE_PATH]\n\r"); return; } argv[0] = "update"; if((argc = parse_param(arg, argv)) != 3){ printf("[ATWO]Usage: ATWO=IP[PORT] or ATWO= REPOSITORY[FILE_PATH]\n\r"); return; } cmd_update(argc, argv); }
// Commands exported by this module. // TODO: Change to use info(). Fix so that only 255 char of data is sent at time. int cmd_publish(){ cmd_update(); Particle.publish("cmds=", cmds_var); return strlen(cmds_var); }