Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

line.requestOutput "The getter 'length' was called on null" #14

Closed
being-yash-t opened this issue Apr 3, 2021 · 2 comments
Closed

line.requestOutput "The getter 'length' was called on null" #14

being-yash-t opened this issue Apr 3, 2021 · 2 comments

Comments

@being-yash-t
Copy link

being-yash-t commented Apr 3, 2021

Using Flutter-Pi
Error: The getter 'length' was called on null

Example:

     final chip = FlutterGpiod.instance.chips
        .singleWhere((chip) => chip.label == 'pinctrl-bcm2835');
    line1 = chip.lines[5];
    line1.requestOutput(initialValue: false);

Device: Raspberry pi 3 B+
OS: Raspberry pi os, Linux raspberrypi 5.10.17-v7+ #1403 SMP Mon Feb 22 11:29:51 GMT 2021 armv7l GNU/Linux

The same code was working with an older version of flutter-pi (before 25 May 2020), I directly opened the project so don't exactly know which release made it stopped working. The issue is there in the current release (yes everything updated).

@ardera
Copy link
Owner

ardera commented Apr 15, 2021

flutter_gpiod is actually completely independent of flutter-pi, you can even use it on linux-desktop or android. It uses the kernel GPIO interface directly.

The problem seems to be they changed the name of the Raspberry Pi GPIO chip on Pi 4 from pinctrl-bcm2835 to pinctrl-bcm2711. The Pi 4 supports more GPIO lines (see here) than previously, but the driver was only changed to expose those additional GPIO lines just now and the name of the device was changed in the process, it seems.

I'll update the readme and examples.

@being-yash-t
Copy link
Author

Thank you for clarity, @ardera.
Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants