Open jorgedevs opened 3 months ago
Setting up the TouchDown event and print the screen coordinates always return 0:
TouchDown
public class MeadowApp : YoshiPiApp { public override Task Initialize() { Resolver.Log.Info("Initialize..."); Hardware.Touchscreen.TouchDown += (s, e) => { Resolver.Log.Info($"Screen: ({e.ScreenX}, {e.ScreenY}) | Raw: ({e.RawX}, {e.RawY})"); }; return Task.CompletedTask; } public override async Task Run() { Resolver.Log.Info("Run..."); await Task.CompletedTask; } }
output:
[application] Run... [application] Screen: (0, 0) | Raw: (2560, 2048) [application] Screen: (0, 0) | Raw: (2304, 2048) [application] Screen: (0, 0) | Raw: (2079, 2560) [application] Screen: (0, 0) | Raw: (799, 3072) [application] Screen: (0, 0) | Raw: (3072, 3072) [application] Screen: (0, 0) | Raw: (2048, 2304) [application] Screen: (0, 0) | Raw: (799, 1792) [application] Screen: (0, 0) | Raw: (2560, 2576) [application] Screen: (0, 0) | Raw: (3072, 3072)
oh, now that I think of it. I need to calibrate the screen first, am i right?
hm never mind, I still get (0,0) after calibrating.
Setting up the
TouchDown
event and print the screen coordinates always return 0:output: