View Single Post
Old 10-26-2016, 02:12 PM   #16 (permalink)
Join Date: Oct 2016
Location: Seattle, WA
Posts: 69

s2k - '02 Honda s2000
Thanks: 12
Thanked 47 Times in 35 Posts
** whew ** new code block added

OK, T, I've added my json functions to your code base. I see how you're calling tFuelRemaing using the index and dfBitShift (some day you can explain how that works, seems like just an index), but some of the parameters don't behave as I expected

dSizeTankSize always returns 24, but dSizeTankSize doesn't look like a pointer so I haven't tried dereferencing it (and I'm not sure what the syntax would be anyway). Also, I'm not sure of the function of dOffsetTankSize, but any math operations on it cause format() to return "-----" which I see is an overflow - is that also called if the number is too small .. i.e. too large of a negative exponent?

I also see dSizeTankSize and dTankOffsetSize are in program arrays. So, to the questions:

-How do I call tank size?

-Is dOffsetTankSize the position of dSizeTankSize in the array, or is it a value such as "reserve fuel?". I'm hoping it's some kind of fuel reserve, but if not that'll be easy for me to add.

-My json send function is big and it's a lot of simpletx. I am seeing my global variables memory footprint gets larger as I add more the sendJson(). This tells me that simpletx is probably building itself in global variable space. If that's true, would making it into several smaller functions drop the footprint? (My guess is no or I would have tried it). I see when you call simpletx you call it once after constructing a big string. Would that be more efficient?

Attached is my set of updates. I will put it in GitHub once I figure out how to create and upload a repository from the command line -- It's time I learned that instead of going to Github, creating the repository, linking the local repository to the remote location ......... I am perfectly comfortable doing all that but I want to do it all from the command line. My GitHub guy will be here in the next hour or so.

Some random thoughts: the drag race function can be useful for hypermilers. All I have to do is add fuel use per run and people can optimize for least fuel use for 0-30, 0-60, etc., as well as least fuel use for first 30 feet, 60 feet, etc. Accelerating away from a stop is a huge efficiency drain and this will help people track it. I'll be renaming it away from "drag" to something more descriptive.
Attached Files
File Type: zip (48.0 KB, 8 views)
  Reply With Quote
The Following User Says Thank You to skybolt For This Useful Post:
t vago (10-27-2016)