Skip to content

Web UI: draw harvester and articulated vehicles on the map - #91

Merged
chriskinal merged 1 commit into
developfrom
fix/vehicle-type-graphics
Sep 19, 2026
Merged

chriskinal merged 1 commit into
developfrom
fix/vehicle-type-graphics

Conversation

@chriskinal

Copy link
Copy Markdown
Collaborator

Summary

The map always drew the tractor sprite regardless of the selected vehicle type (#88). The native renderer only ever had the tractor, so this ports the other two types from AgOpenGPS CVehicle.DrawVehicle, using its AoG brand textures:

  • Harvester — body 2·tw × 3·wb centred on the pivot; steerable wheels at the rear axle, turned opposite to a tractor and tinted dark (AgOpenGPS HarvesterWheelColor).
  • Articulated — front and rear halves 2·tw × 1.3·wb centred ±wb/2 about the hinge, each turned by half the steer angle.
  • Tractor — unchanged apart from sharing the vehicle-frame setup.

Adds HarvesterAoG.png, ArticulatedFrontAoG.png and ArticulatedRearAoG.png to wwwroot/icons, copied from AgOpen_Snapshot. Until a sprite loads, the existing triangle fallback is drawn.

Testing

Manually checked in the desktop app: switched between tractor, harvester and articulated in vehicle settings and steered in the simulator.

Fixes #88

🤖 Generated with Claude Code

The map always drew the tractor sprite regardless of the selected vehicle
type. Add AgOpenGPS's AoG harvester and articulated front/rear textures and
draw them with the same per-type layout as AgOpenGPS CVehicle:

- Harvester: body 2*tw x 3*wb centred on the pivot, steerable wheels at
  the rear axle turned opposite to a tractor, tinted dark.
- Articulated: front and rear halves 2*tw x 1.3*wb centred +/-wb/2 about
  the hinge, each turned by half the steer angle.

The tractor path is unchanged apart from sharing the vehicle-frame setup.
Until a sprite loads, the existing triangle fallback is drawn.

Fixes #88

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chriskinal
chriskinal merged commit d7360fc into develop Sep 19, 2026
4 checks passed
@chriskinal
chriskinal deleted the fix/vehicle-type-graphics branch September 19, 2026 11:55
mukptl pushed a commit to mukptl/AgOpenWeb that referenced this pull request Sep 22, 2026
- Section zones (Tool config -> Zones) now do what AgOpenGPS does with them:
  the section bar shows one button per zone instead of per section, and a
  tap cycles the zone's last section Off -> Auto -> On and applies it to
  every section in the zone (btnZoneX_Click). New gated section.toggleZone.
  Automatic control and hardware output stay per section, as in AgOpenGPS.
- Vehicle type Harvester forces a front-mounted tool and the tool panel only
  offers Front Fixed (AgOpenGPS ConfigTool). Vehicle drawing by type was
  already done (AgOpenGPS-Official#88/AgOpenGPS-Official#91).

Steer switch enable was already wired by AgOpenGPS-Official#124 (steer switch as work switch,
auto or manual sections).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Only tractor vehicle type has the correct graphic on screen

1 participant