#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <math.h>

#include "./SYSTEM/sys/sys.h"

#include "./hmi/hmi_cmd.h"
#include "./hmi/hmi_rx_parse.h"
#include "./hmi/hmi_hex_parse.h"

#include "./hmi_progerss_bar_example.h"

void hmi_progerss_bar_example_hex_cmd(struct hex_cmd_fmt *fram)
{
    uint8_t wid_id = fram->func;

    if (wid_id)
    {
    }
}

void hmi_progerss_bar_example_timer_update_50ms(uint16_t page_id)
{

    if (page_id != 8)
        return;
    cmd_res_t *back = hmi_cmd_back_res();
    bool res = false;

    res = API_GET(bar0.val);
    if (!res)
    {
        printf("huoqu err!");
    }
    back = hmi_cmd_back_res();
    TIM3->CCR2 = back->val.value;
    API_CMD_SEND(bar0.val += 2);
    return;
}
