Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touch axes inverted #390

Open
MihirGrand opened this issue Feb 28, 2024 · 1 comment
Open

Touch axes inverted #390

MihirGrand opened this issue Feb 28, 2024 · 1 comment

Comments

@MihirGrand
Copy link

MihirGrand commented Feb 28, 2024

Hello again!

I am able to see my app well on the display, its a 3.5" touch display

I am also able to click buttons in my app, but the calibration is way off. I tried adding a single button to the entire screen and tapping to see where I touch and where it actually gets tapped.

I'm assuming I have a similar problem to those mentioned in some previous issues where the calibration was off

I tried building your calibrator at https://github.com/ardera/flutter_libinput_calibrator using flutter-pi with the usual steps but I get the following error -

../.pub-cache/hosted/pub.dev/google_fonts-3.0.1/lib/src/google_fonts_base.dart:14:1: Error: 'AssetManifest' is imported
from both 'package:flutter/src/services/asset_manifest.dart' and 'package:google_fonts/src/asset_manifest.dart'.
import 'asset_manifest.dart';
^^^^^^^^^^^^^
../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/interface/file.dart:15:16: Error: The method 'File.create' has fewer
named arguments than those of overridden method 'File.create'.
  Future<File> create({bool recursive = false});
               ^
org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:232:16: Context: This is the overridden method ('create').
  Future<File> create({bool recursive = false, bool exclusive = false});
               ^
../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/interface/file.dart:15:16: Error: The method 'File.create' doesn't have
the named parameter 'exclusive' of overridden method 'File.create'.
  Future<File> create({bool recursive = false});
               ^
org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:232:16: Context: This is the overridden method ('create').
  Future<File> create({bool recursive = false, bool exclusive = false});
               ^
../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/forwarding/forwarding_file.dart:22:8: Error: The method
'ForwardingFile.createSync' has fewer named arguments than those of overridden method 'File.createSync'.
  void createSync({bool recursive = false}) =>
       ^
org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:248:8: Context: This is the overridden method ('createSync').
  void createSync({bool recursive = false, bool exclusive = false});
       ^
../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/forwarding/forwarding_file.dart:22:8: Error: The method
'ForwardingFile.createSync' doesn't have the named parameter 'exclusive' of overridden method 'File.createSync'.
  void createSync({bool recursive = false}) =>
       ^
org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:248:8: Context: This is the overridden method ('createSync').
  void createSync({bool recursive = false, bool exclusive = false});
       ^
../.pub-cache/hosted/pub.dev/google_fonts-3.0.1/lib/src/google_fonts_base.dart:32:31: Error: 'AssetManifest' is imported
from both 'package:flutter/src/services/asset_manifest.dart' and 'package:google_fonts/src/asset_manifest.dart'.
AssetManifest assetManifest = AssetManifest();
                              ^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception
#0      KernelSnapshot.build (package:flutter_tools/src/build_system/targets/common.dart:274:7)
<asynchronous suspension>
#1      _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:861:9)
<asynchronous suspension>
#2      Future.wait.<anonymous closure> (dart:async/future.dart:518:21)
<asynchronous suspension>
#3      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:799:32)
<asynchronous suspension>
#4      Future.wait.<anonymous closure> (dart:async/future.dart:518:21)
<asynchronous suspension>
#5      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:799:32)
<asynchronous suspension>
#6      Future.wait.<anonymous closure> (dart:async/future.dart:518:21)
<asynchronous suspension>
#7      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:799:32)
<asynchronous suspension>
#8      FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:628:16)
<asynchronous suspension>
#9      buildFlutterpiBundle (package:flutterpi_tool/src/build_bundle.dart:375:20)
<asynchronous suspension>
#10     BuildCommand.run.<anonymous closure> (package:flutterpi_tool/src/build_bundle.dart:668:11)
<asynchronous suspension>
#11     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
<asynchronous suspension>
#12     BuildCommand.run (package:flutterpi_tool/src/build_bundle.dart:632:5)
<asynchronous suspension>
#13     CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#14     main (package:flutterpi_tool/src/build_bundle.dart:777:5)
<asynchronous suspension>
#15     main (file:///home/mihir/.pub-cache/hosted/pub.dev/flutterpi_tool-0.3.0/bin/flutterpi_tool.dart:4:3)
<asynchronous suspension>

Building Flutter-Pi bundle...
Failed to build bundle.

How do I proceed from here? If not to use this tool, how do I manually debug and calibrate the display?

@MihirGrand MihirGrand changed the title Touch input not working Touch axes inverted Feb 29, 2024
@MihirGrand
Copy link
Author

So I copied the code from your libinput calibrator, pasted it in a new project, and it built successfully without google fonts. I ran it on my raspberrypi but there's one issue, the app goes out of bounds of the display horizontally, it extends beyond so some part is cut and I can't access the targets on the right. How do I fix the resolution issue? I already set the framebuffer width to 480 and framebuffer height to 320 in /boot/config.txt

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

No branches or pull requests

1 participant