先这样

This commit is contained in:
zogodo
2019-10-21 22:35:48 +08:00
parent dec15c002b
commit 2fec84d187
3 changed files with 5 additions and 15 deletions

View File

@@ -29,7 +29,7 @@
.line_8{height:12px;}
.line_9{height:10px;border:none;}
#power_div{margin-top:10px;border-left:1px solid #000;border-bottom:1px solid #000;}
#power_line{height:100px;position:relative;overflow:scroll;margin-top:-100px;}
#power_line{height:120px;position:relative;overflow:scroll;margin-top:-120px;}
.power_pre{position:absolute;bottom:0;float:left;height:76px;width:0;border-left:1px solid #00ffff38;border-top:1px solid #000;}
.power_by{text-align:center;}
.power_by a{text-decoration:none;}
@@ -225,7 +225,7 @@ HttpGet("/status", function (re) {
});
var first_load_power = true;
var power_idx = 1;
var power_idx = 0;
var position = 0;
function GetPowerRecord() {
HttpPost("/power", function (re) {
@@ -233,7 +233,7 @@ function GetPowerRecord() {
power_idx = power.idx + 1;
var html = "";
for (var i = 0; i < power.powers.length; i++) {
var y = Math.pow(power.powers[i], 0.6);
var y = Math.pow(power.powers[i]/10, 0.6);
html += "<div class='power_pre' style='height:"+y+"px;left:"+position+"px;'></div>";
position += 1;
}

File diff suppressed because one or more lines are too long

View File

@@ -10,17 +10,7 @@
mico_timer_t power_timer;
PowerRecord power_record = { 1, {
0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,16,17,18,19,
20,21,22,23,24,25,26,27,28,29,
30,31,32,33,34,35,36,37,38,39,
40,41,42,43,44,45,46,47,48,49,
50,51,52,53,54,55,56,57,58,59,
60,61,62,63,64,65,66,67,68,69,
70,71,72,73,74,75,76,77,78,79,
80,81,82,83,84,85,86,87,88,89,
90,91,92,93,94,95,96,97,98,99 } };
PowerRecord power_record = { 1, { 0 } };
static uint32_t clock_count_last = 0;
static uint32_t clock_count = 0;