Commit Graph

12 Commits

Author SHA1 Message Date
Sylvain Munaut 09b31b4acf fosphor: Review the GL frequency mapping and switch zoom to {center,span}
Previously we were hiding the extrema bin, now we display it "half" on
each side which sort of maps better to the concept of circular spectrum

At the same time we move the zoom spec to {center,span} rather than
{start,stop} since it makes more sense and matches the channel specs

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-01-31 23:46:54 +01:00
Sylvain Munaut b17258f1fc fosphor: Don't redefine gettimeofday in mingw build
Thanks to Martin Hauke <mardnh@gmx.de> for reporting

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2016-01-25 16:27:00 +01:00
Sylvain Munaut acdddf6e90 fosphor: Use lowercase for WIN32 includes
Apparently needed for mingw build and doesn't affect the MSVC ones.

Thanks to Martin Hauke <mardnh@gmx.de> for reporting

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2016-01-25 16:27:00 +01:00
Sylvain Munaut 11f27973a9 fosphor: Add a color intensity scale on the right side
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2015-01-19 14:16:25 +01:00
Sylvain Munaut 02e0db8fdb fosphor/main: Fix the render option initialization sequence
Since the width/height will be set as part of the initial reshape
callback and this is done in glfw_init, we need to make sure we
do the first init of the render option _before_ that, or we'll
undo what glfw_init did.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-07-24 22:34:06 +02:00
Sylvain Munaut affd1a3eb7 fosphor: Update the test software to showcase the new display functions
Note that the zoom_* vars are kept as double to avoid error build-up
when changing them a lot from the UI.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-07-22 10:16:39 +02:00
Sylvain Munaut 8fb8606c38 fosphor: Drawing code overhaul + Introduce 'render options'
There is a lot of parameters that have no influence on the internal
computations but solely affect the rendering call. The height / width
are the only two that were supported previously.

This commit re-structures the drawing code and introduces a lot more
of those parameters. Instead of just passing them all as arguments, a
'struct fosphor_render' is introduced to hold them.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-07-22 10:16:38 +02:00
Sylvain Munaut 4ca8954908 fosphor/main: Improve the error handling path of the benchmark utility
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-12-11 23:54:50 +01:00
Sylvain Munaut ca3f391976 fosphor: Store the selected power range in the top level 'struct fosphor'
The CL code keeps its own copy since those values are tweaked to be
applied in the kernel. We may also need the callback in the future if
instead of storing them we reconfigure the kernel at that point.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-11-10 22:24:06 +01:00
Sylvain Munaut 3ccf1aa52d fosphor: Refactor to introduce more shared state between global/cl/gl
Originally I wanted the CL/GL part to be as separate as possible and
have no shared data. But it's too inconvenient since a beside the
CL / GL objects there is also configuration data that should be shared
and distributed between the two.

So instead we still have separate gl/cl state that are restricted but
the function act on a shared 'struct fosphor' object that contains
everything that's shared and exposed to both cl.c and gl.c

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-11-10 22:24:06 +01:00
Sylvain Munaut 68f0302bce fosphor: Misc typo & whitespace fixes
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-11-10 22:24:06 +01:00
Sylvain Munaut aabc21b7f2 fosphor: Initial import of the core code
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-13 22:05:38 +02:00