- Status Unconfirmed
- Percent Complete
- 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
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.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Woops, I added the resistor file rather than the patch file, here is the actual patch.
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.
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