Torque

Forums

Forums

Guest  

Show or hide header
Welcome Guest, posting in this forum require registration.




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » Bug Report: Bitwise operators and parenthesis

Pages: [1]
Author Topic: Bug Report: Bitwise operators and parenthesis
albuquerquefx
Member
Posts: 10
Post Bug Report: Bitwise operators and parenthesis
on: December 4, 2017 (GMT)

Affects Torque Pro app version: 1.8.178
Android version: 6.0.1
Android device: Galaxy S3 (D2ATT)
OBD2 Device: OBDLink MX

Bug Description
Formulas which include one or more bitwise operators enclosed in matching parenthesis will generate a “Variable ‘n}’ does not exist” message, where the value n represents the bitwise position specified in the formula.

Bug replication:
You do NOT need to be connected to a car or an OBD2 device to replicate this error.
Follow the typical workflow to Add Custom PID
In the OBD2 Mode and PID, enter 010B
Use test as the long and short names
Use 0 for minimum value; 1 for maximum value
Leave x1 as the default scale factor
In the equation step, type ({A:1})

A red bang will appear, stating Variable ‘1}’ does not exist

Delete the parenthesis and the formula will now be treated as correct.

Thank you for your consideration.

piemmm
Administrator
Posts: 6629
Post Re: Bug Report: Bitwise operators and parenthesis
on: December 4, 2017 (GMT)

Hi!

Thanks for the good bug report! I’ll try to get that fixed for you in the next beta!

albuquerquefx
Member
Posts: 10
Post Re: Bug Report: Bitwise operators and parenthesis
on: December 4, 2017 (GMT)

Thank you for this, and for the overall Torque app :)

I’ve been drumming up some business for you in the 3rd Gen Miata community. I maintain a rather large (and free) list of Mazda MX5 PIDs over on the Miata.net forums: https://forum.miata.net/vb/showthread.php?p=8529262

This particular bug has stymied my math attempt at generating a positive manifold pressure flag for filtering knock events. I’ve got a workaround for now, with some long division and ABS functionality.

piemmm
Administrator
Posts: 6629
Post Re: Bug Report: Bitwise operators and parenthesis
on: December 5, 2017 (GMT)

Hi!

That’s pretty cool :-) – if you want, I can include that list as part of the default PIDs in the app when you’re happy with it!

Because the bug is a bit of a pain to fix (it’d need a bit of messy coding to sort out), I’ve decided to deprecate the notation for it (ie: the {A:1}) and change it to a function name instead, so it will be: BIT(A:1) and will let you properly nest functions (The old method will be left alone so it will still ‘work’)

albuquerquefx
Member
Posts: 10
Post Re: Bug Report: Bitwise operators and parenthesis
on: March 30, 2018 (GMT)

Piemm, I would love to get you these Mazda Miata Pids

They’ve had plenty of time to be vetted and tested by a slew of enthusiasts, and are now updated to reflect your recent changes to bitwise operators and the integer functions. How best can I send you these?

albuquerquefx
Member
Posts: 10
Post Re: Bug Report: Bitwise operators and parenthesis
on: June 25, 2018 (GMT)

Bump from the grave..

Piemm, I’d still like to provide you this MX5 “NC” comprehensive PID list for your teams’ future inclusion with the Torque app.

How best to send you these?

Pages: [1]
WP-Forum by: Fredrik Fahlstad, Version: 2.4
Page loaded in: 0.034 seconds.

  Follow me on twitter