Conversation
Only plot one point per minute to unclutter several days fermentation charts.
| row[0], "%Y-%m-%d %H:%M:%S") - | ||
| datetime.datetime(1970, 1, 1)).total_seconds()) * 1000 | ||
| if ( abs(float(row[1])) < 110 ) and # filter invalid points | ||
| ( p_time >= l_time ): # only plot if more than 60 sec from previus point |
There was a problem hiding this comment.
good idea, but IMO should be configurable...
There was a problem hiding this comment.
You mean the enable/disable or the time interval ( 60 sec )?
There was a problem hiding this comment.
@lalo-uy I think you could have a parameter plot_period to configure that and have the default of 60.
So you replace the line: l_time = p_time + 60000;
With: l_time = p_time + 1000 * cbpi.get_config_parameter("plot_period", 60)
It that what you meant @jpgimenez?
There was a problem hiding this comment.
👍 agree... the parameter is better than a hardcoded value
| row[0], "%Y-%m-%d %H:%M:%S") - | ||
| datetime.datetime(1970, 1, 1)).total_seconds()) * 1000 | ||
| if ( abs(float(row[1])) < 110 ) and # filter invalid points | ||
| ( p_time >= l_time ): # only plot if more than 60 sec from previus point |
There was a problem hiding this comment.
@lalo-uy I think you could have a parameter plot_period to configure that and have the default of 60.
So you replace the line: l_time = p_time + 60000;
With: l_time = p_time + 1000 * cbpi.get_config_parameter("plot_period", 60)
It that what you meant @jpgimenez?
|
Good one.
El El lun, 12 de oct. de 2020 a la(s) 11:03, staticdev <
notifications@github.com> escribió:
…
***@***.**** requested changes on this pull request.
------------------------------
In modules/logs/endpoints.py
<#7 (comment)>:
> for row in reader:
try:
- array.append([
- int((datetime.datetime.strptime(
- row[0], "%Y-%m-%d %H:%M:%S") -
- datetime.datetime(1970, 1, 1)).total_seconds()) *
- 1000,
- float(row[1])
- ])
+ p_time=int((datetime.datetime.strptime( # get point timestamp
+ row[0], "%Y-%m-%d %H:%M:%S") -
+ datetime.datetime(1970, 1, 1)).total_seconds()) * 1000
+ if ( abs(float(row[1])) < 110 ) and # filter invalid points
+ ( p_time >= l_time ): # only plot if more than 60 sec from previus point
@lalo-uy <https://github.com/lalo-uy> I think you could have a parameter
plot_period to configure that and have the default of 60.
So you replace the line: l_time = p_time + 60000;
With: l_time = p_time + 1000 * cbpi.get_config_parameter("plot_period",
60)
It that what you meant @jpgimenez <https://github.com/jpgimenez>?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXBW4IBN6HSF4Y5M7GKXWDSKMEDPANCNFSM4P7Q4CLA>
.
|
@lalo-uy if you add the parameter I'm good with merging this... |
Only plot one point per minute to unclutter several days fermentation charts.
Even on kettle to many point do not make sense.