mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 21:18:13 +08:00
测试数据.
This commit is contained in:
@@ -256,7 +256,7 @@ function GetPowerRecord() {
|
|||||||
var power = JSON.parse(re);
|
var power = JSON.parse(re);
|
||||||
var html = "";
|
var html = "";
|
||||||
for (var i = 0; i < power.powers.length; i++) {
|
for (var i = 0; i < power.powers.length; i++) {
|
||||||
html += "<div class='power_pre' style='height:70px;left:20px;'></div>";
|
html += "<div class='power_pre' style='height:"+power.powers[i]+"px;left:"+((i+1)*10)+"px;'></div>";
|
||||||
power_line.innerHTML = html;
|
power_line.innerHTML = html;
|
||||||
//滑动到最后
|
//滑动到最后
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
mico_timer_t power_timer;
|
mico_timer_t power_timer;
|
||||||
|
|
||||||
PowerRecord power_record = { 0, NULL };
|
PowerRecord power_record = { 0, { 50,55,60,65,70,75,80,85,90,95,90,85,80,75,70,65,60,65,70,75,80,85,90,95,90,85,80,75,70,65,60,65,70,75,80,85,90,95,90,85,80,75,70,65,60 } };
|
||||||
|
|
||||||
static uint32_t clock_count_last = 0;
|
static uint32_t clock_count_last = 0;
|
||||||
static uint32_t clock_count = 0;
|
static uint32_t clock_count = 0;
|
||||||
@@ -21,10 +21,6 @@ char power_record_str[1101] = { 0 };
|
|||||||
|
|
||||||
void SetPowerRecord(PowerRecord* pr, uint32_t pw)
|
void SetPowerRecord(PowerRecord* pr, uint32_t pw)
|
||||||
{
|
{
|
||||||
if (pr->powers == NULL)
|
|
||||||
{
|
|
||||||
pr->powers = malloc(sizeof(uint32_t)*PW_NUM);
|
|
||||||
}
|
|
||||||
if (pr->idx >= PW_NUM)
|
if (pr->idx >= PW_NUM)
|
||||||
{
|
{
|
||||||
pr->idx = 0;
|
pr->idx = 0;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int idx;
|
int idx;
|
||||||
uint32_t* powers;
|
uint32_t powers[PW_NUM];
|
||||||
} PowerRecord;
|
} PowerRecord;
|
||||||
|
|
||||||
extern PowerRecord power_record;
|
extern PowerRecord power_record;
|
||||||
|
|||||||
Reference in New Issue
Block a user