|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The directions of a partial ring that need no angle worked out: the middle of its lit part, drawn in the full colour at the full coverage, and the middle of its gap, drawn not at all. More...
Data Fields | |
| float | mx |
| float | my |
| bool | has_in |
| float | in_cos |
| bool | has_out |
| float | out_cos |
The directions of a partial ring that need no angle worked out: the middle of its lit part, drawn in the full colour at the full coverage, and the middle of its gap, drawn not at all.
A pixel's distance from the arc's middle direction is read off the dot product with that direction, without atan2f(): within in_cos of it the pixel is further than the fade and half a pixel of arc inside both ends, beyond out_cos it is half a pixel of arc outside them, each with 0.5deg to spare. Between the two the angle is worked out as before, so every pixel comes out as it did.
| bool ring_cut_t::has_in |
in_cos holds
| bool ring_cut_t::has_out |
out_cos holds
| float ring_cut_t::in_cos |
cosine within which a pixel is lit whole
| float ring_cut_t::mx |
the middle direction's x
| float ring_cut_t::my |
its y, up the screen as +y
| float ring_cut_t::out_cos |
cosine beyond which a pixel is in the gap