pwm 50hz的频率测试正常
This commit is contained in:
@ -279,26 +279,26 @@ void contol_key_task(void){
|
||||
control_key_init(); //遥感按键初始化
|
||||
|
||||
while(1){
|
||||
// extern u16 get_vbat_level(void);
|
||||
// vbat_value = get_vbat_level(); //当前电量
|
||||
// control_key_get_value(&Xout_adc, &Yout_adc, &key1_state, NULL); //遥感值
|
||||
// ble_data_buff[4] = (u8)(Yout_adc & 0xFF);
|
||||
// ble_data_buff[5] = (u8)((Yout_adc >> 8) & 0xFF);
|
||||
extern u16 get_vbat_level(void);
|
||||
vbat_value = get_vbat_level(); //当前电量
|
||||
control_key_get_value(&Xout_adc, &Yout_adc, &key1_state, NULL); //遥感值
|
||||
ble_data_buff[4] = (u8)(Yout_adc & 0xFF);
|
||||
ble_data_buff[5] = (u8)((Yout_adc >> 8) & 0xFF);
|
||||
|
||||
// ble_data_buff[6] = (u8)(Xout_adc & 0xFF);
|
||||
// ble_data_buff[7] = (u8)((Xout_adc >> 8) & 0xFF);
|
||||
ble_data_buff[6] = (u8)(Xout_adc & 0xFF);
|
||||
ble_data_buff[7] = (u8)((Xout_adc >> 8) & 0xFF);
|
||||
|
||||
// ble_data_buff[8] = key1_state;
|
||||
// ble_data_buff[9] = 0x01;
|
||||
ble_data_buff[8] = key1_state;
|
||||
ble_data_buff[9] = 0x01;
|
||||
|
||||
// ble_data_buff[10] = get_vbat_percent();
|
||||
ble_data_buff[10] = get_vbat_percent();
|
||||
|
||||
// ble_data_buff[11] = 0;
|
||||
// for(int i = 0 ;i < 11; i++){
|
||||
// ble_data_buff[11] += ble_data_buff[i];
|
||||
// }
|
||||
ble_data_buff[11] = 0;
|
||||
for(int i = 0 ;i < 11; i++){
|
||||
ble_data_buff[11] += ble_data_buff[i];
|
||||
}
|
||||
|
||||
u8 test_buff[12] = {0xBE,0xBB,0x09,0x01,0x50,0x50,0x50,0x50,0x01,0x01,0x50,0x15};
|
||||
// u8 test_buff[12] = {0xBE,0xBB,0x09,0x01,0x50,0x50,0x50,0x50,0x01,0x01,0x50,0x15};
|
||||
g_send_data_to_ble_server(ble_data_buff, sizeof(ble_data_buff));
|
||||
/*
|
||||
1000
|
||||
@ -485,7 +485,9 @@ void test_task(void){
|
||||
void test_func_main(void){
|
||||
#if TEST_FUNCTION == 1
|
||||
|
||||
os_task_create(test_task, NULL, 1, 1024, 128, "rfid_test");
|
||||
// os_task_create(test_task, NULL, 1, 1024, 128, "rfid_test");
|
||||
extern void pwm_test_main(void);
|
||||
os_task_create(pwm_test_main, NULL, 1, 1024, 128, "pwm_test");
|
||||
// os_task_create(contol_key_task, NULL, 1, 2048, 128, control_key_task_name);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user