Closed FrightRisk closed 3 years ago
what do you think most useful to user? we can replace the content instead of appending.. so not only for throttle, for every command the content (log) will be replaced.
I noticed that that happened. My suggestion would be to only have one entry for a throttle turn. Here is an example
1 t1 3 100 1
If the throttle was turned again, it would look like this:
1 t1 3 100 1 t1 3 5 1
Basically, all movements with less than one second (for example) between them would be contacted to one output.
@FrightRisk I removed animation and it is quickly moving bottom. I think this is fine for me. Code below:
// Display log of events
function displayLog(data){
$("#log-box").append("<br>"+data+"<br>");
$("#log-box").scrollTop($("#log-box").prop("scrollHeight"));
}
@matt-hu As you suggested (if I understand what you are trying there) we can use timeout to clear old log. That means if the message (log) is displayed 1 second ago (or whatever timing it is) we clear it else we append it.
@ManiAkasapu that sounds about right. Do you want to have a go at implementing it in a separate branch so we can then have a look? There's no rush if you are going to do that.
I think the main problem is delay. I removed the animation from the Logbox and now the scroll is moving to bottom without delay. I think that is enough to fix this issue. @matt-hu Let's wait and see how this change works. So I would recommend to defer. What do think?
@ManiAkasapu, sorry I didn't see the code sample, my mistake! I've tried that out and it seems good! I will commit it to my dev branch. Great work!
@matt-hu @FrightRisk I think we can close this.
Yep! Well done for noticing.
We need to make sure that the log has no delay, but also what do we do with something like a throttle that can fill the buffer if we spin it back and forth quickly? We can have hundreds of throttle commands that will take forever to catch up in the log. Do we flush the buffer when the throttle is changed and only show the last command? Thoughts?