61625aa58c
wip
2025-07-01 13:27:23 +01:00
223d6b4929
clamp angle to -pi..pi
2025-07-01 13:27:13 +01:00
c56943e6e1
use cqueues for gnss socket
...
This is to avoid a weird bug in the previous glib iochannel
implementation, where the socket was randomly being closed
after about a minute run time. But it's also less code, so
that's OK
2025-06-30 23:02:54 +01:00
b739d9a411
experiment: smooth orientation a bit
...
remember three most recent orientation values and pick the middle one
but clamped between the values of the least and most recent
2025-06-30 18:19:20 +01:00
64789d1fe9
rewrite fake-nmea to not need socat
2025-06-30 18:17:13 +01:00
01e260e9aa
remove debug print
2025-06-17 22:10:41 +01:00
0b91d4200f
wrap expectations in define-tests
...
this means they'll be executed by "make test" and not compiled
at all in AOT mode
2025-06-17 22:05:03 +01:00
6ca0e77604
add Makefile targets to run in-place and to run tests
2025-06-17 22:05:03 +01:00
360c381b33
move top-level forms into a main function
...
this is to prepare for making this a module
2025-06-17 21:40:35 +01:00
e5fdab4852
turn faster
2025-06-16 11:51:12 +01:00
173a440bd6
rotate the offscreen map
...
this takes us from 60% cpu to about 20% (on my laptop, your hardware
may vary) when we're travelling in a straight line, as we render the
offscreen map only when the bounds change or the target orientation
changes, not every time we move
2025-06-15 17:52:06 +01:00
6b921e2c25
clamp minimum turn speed
...
if there's less than ten degrees between target and actual, snap to
target. Otherwise we only approach the target asymptotically and never
reach it
2025-06-15 17:49:46 +01:00
ccca847e3c
don't force invalidate map widget unless moved
...
* make the app-state a single-level table so we can easily
copy it and check for changes
* call invalidate_rect only if we've moved or changed orientation
2025-06-14 12:10:49 +01:00
2406a15db9
support cairo-trace (but it doesn't work)
...
this env var is needed for cairo-trace to run, but note it doesn't
actually print anything. I don't know why but will speculate that
it's a gir thing
2025-06-14 11:54:40 +01:00
17e3e0397f
add environment variable to enable profile stats collection
2025-06-12 20:53:22 +01:00
1486e5a9e0
avoid reffing g:line_to in loop
...
it makes a difference on the flame graph but not a noticeable one in
top
2025-06-11 23:11:20 +01:00
deedd02efd
add LuaProfiler to dev shell
2025-06-11 22:06:54 +01:00
8637731c60
repaint map when orientation changes
...
this is in preparation for writing the road labels on the right way
up
2025-06-11 17:41:28 +01:00
b3f0628948
whitespace
2025-06-10 20:13:49 +01:00
d8963679d6
add compass rose
2025-06-10 20:13:41 +01:00
6c3f019ab7
only change orientation if course is > 20 degrees off
...
means we don't spin around quite as much, which is nice
2025-06-10 20:13:41 +01:00
eaa4ad895f
calculate road label placement on fetch not on render
2025-06-10 20:13:41 +01:00
13d56d59ba
remove road-width debug
2025-06-09 22:06:07 +01:00
988a30801b
add with-timing macro to see why it's slow
2025-06-09 22:05:38 +01:00
4aa140c264
always use callback in tiles.fetch (formerly polylines)
2025-06-09 13:30:11 +01:00
406cedbce1
extract tile-name
2025-06-09 13:19:47 +01:00
4edf246cf6
extract bounds= function
2025-06-09 13:05:43 +01:00
d7852700a5
rename smooth-course -> orientation
2025-06-09 10:21:58 +01:00
53e377cabd
widen map obunds so that rotation works
...
...without showing missing white bits in the corners when moving
diagonally
2025-06-08 19:10:11 +01:00
56f070ceee
refresh less often
2025-06-08 18:00:56 +01:00
8ec64bb1b0
rotate the map to face direction of travel
...
there is a bit of smoothing so it does not instantly lurch to the
new new course, as the visual effect was quite jarring
2025-06-08 17:59:46 +01:00
8c51113d6e
fix arrow to point in the right direction
2025-06-07 20:49:35 +01:00
ee286a0aef
rename map-{width,height} as viewport-{width,height}
2025-06-07 12:29:28 +01:00
2d2f592d73
add pixel dimensions in bounds
2025-06-07 12:28:20 +01:00
1ee968d3a2
pass bounds to draw-onto-map-surface instead of recalculating
2025-06-07 11:50:17 +01:00
f275190538
fetch correct tile from overpass not diagonally adjacent one
2025-06-06 21:39:31 +01:00
0b22a7e538
pass lat/lon/zoom to draw-onto-map-surface
...
this removes dependency on global state
and will make it simpler to generate map for arbitrary co-ordinates
2025-06-06 21:33:19 +01:00
beca254bf6
rename cairo-the-map -> draw-onto-map-surface
...
and make it take a surface directly, not a window
2025-06-06 21:31:31 +01:00
4c2bed5ef0
rewrite map-bounds to fetch fewer off-screen tiles
2025-06-06 21:14:19 +01:00
fef52f812a
add on-completion callback to tile fetcher, invalidate map-surface
2025-06-05 23:11:37 +01:00
cdd7ea3a94
add fennel-ls to shell derivation
...
I'm unsure whether it's actually useful or not, haven't tried it yet
2025-06-05 23:03:08 +01:00
63e592d33d
first go at varying the line width based on highway classification
2025-06-05 23:02:44 +01:00
e5e1060c3f
add colour/translucency to road name background
...
this is an experiment in making them look less like road when the
placement causes them to run off the end of the actual way
2025-06-04 00:16:58 +01:00
c53120ab2a
print fewer upside down road labels
2025-06-04 00:14:43 +01:00
e728052bb6
print each road name once only
2025-06-03 22:18:05 +01:00
7195dbb2d5
make road names bigger and print white behind them
2025-06-03 22:18:05 +01:00
84a80d7c79
upgrade lgi
2025-06-03 22:18:05 +01:00
7934d5ba13
off-white background colour
2025-06-03 22:18:05 +01:00
ccb47e3a3d
improve text placement
2025-06-03 22:18:05 +01:00
37767e007a
render road names (badly)
2025-06-03 22:18:05 +01:00