Rockbox

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by LeifAndersen - 2011-03-23

FS#12025 - Ohm's Law Calculator added to resistor.c plugin

(Made using r29635)

This plugin adds an Ohm's Law calculator feature to the resistor.c plugin. It takes two inputs, of either (voltage, resistance, current, power), but not both of the same time, it will then calculate the other two values.

Woops, I added the resistor file rather than the patch file, here is the actual patch.

Admin
fg commented on 2011-03-24 11:00

I'll have a proper look at this during the weekend

Oh dear, I was looking at the file, and it appeared that I had three lines with tabs in there…I have fixed the problem and uploaded a new patch. I believe it can be applied with patch -p1 < 0001-Added-Ohm-s-Law-feature-to-resistor.c-plugin-patch

Anyway, thank you for being willing to take a look at it.

Admin
fg commented on 2011-03-28 17:01

There are still some tabs in there :) Those are easy to fix though, and therefore not a real problem.

The only thing that bothers me a bit is that you use floating point types. While this does work in plugins, it's not something we really like (most of our players don't have floating point hardware). It's not a real problem in this case, since you only do very few calculations, so floating point emulation won't be too slow. It would still be nice if this could be done using only fixed point arithmetic though.

Ugg…thanks, I'll pull the tabs out.

Anyway, I will re-write the operations to only used fixed point arithmetic. I originally didn't do it as it seemed like floating point worked fine, but it's not too hard to write

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing