Feature/sangshuduo/td 5136 taosdemo rework (#6837)

* [TD-5136]<feature>: taosdemo simulate real senario.

* update test case according to taosdemo change

* adjust range of semi-random data.
This commit is contained in:
Shuduo Sang 2021-07-13 10:38:55 +08:00 committed by GitHub
parent 4486cae180
commit 54bdd895f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1331,21 +1331,21 @@ static float demo_current_float(){
static int cursor;
cursor++;
cursor = cursor % MAX_PREPARED_RAND;
return (float)(5 + randfloat[cursor] / 1000000000);
return (float)(9.8 + 0.04 * (randint[cursor] % 10) + randfloat[cursor]/1000000000);
}
static int32_t demo_voltage_int(){
static int cursor;
cursor++;
cursor = cursor % MAX_PREPARED_RAND;
return 210 + randint[cursor] % 20;
return 215 + randint[cursor] % 10;
}
static float demo_phase_float(){
static int cursor;
cursor++;
cursor = cursor % MAX_PREPARED_RAND;
return (float)(120 + randfloat[cursor] / 1000000000);
return (float)((115 + randint[cursor] % 10 + randfloat[cursor]/1000000000)/360);
}
#if 0