Just import picamerax if Pi is used
parent
cf5916dd0e
commit
4b7842a737
|
@ -99,7 +99,7 @@ Get the latest TLEs:
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
# Misc
|
# Fixed
|
||||||
When running `acquire.py` on `amd64` architecture it gives this error:
|
When running `acquire.py` on `amd64` architecture it gives this error:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -117,6 +117,8 @@ That error comes from installing `picamerax` on `amd64`, which was added to
|
||||||
env/lib/python3.10/site-packages/picamerax/bcm_host.py:_lib = ct.CDLL('libbcm_host.so')
|
env/lib/python3.10/site-packages/picamerax/bcm_host.py:_lib = ct.CDLL('libbcm_host.so')
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For now, just import the library that calls for that binary if the
|
||||||
|
Pi camera is used. No need to call it (and crash) if CV2 is used on non-Pi.
|
||||||
|
|
||||||
|
|
||||||
# Upstream
|
# Upstream
|
||||||
|
|
|
@ -15,12 +15,12 @@ import logging
|
||||||
import configparser
|
import configparser
|
||||||
import argparse
|
import argparse
|
||||||
import zwoasi as asi
|
import zwoasi as asi
|
||||||
from picamerax.array import PiRGBArray
|
|
||||||
from picamerax import PiCamera
|
|
||||||
|
|
||||||
|
|
||||||
# Capture images from pi
|
# Capture images from pi
|
||||||
def capture_pi(image_queue, z1, t1, z2, t2, nx, ny, nz, tend, device_id, live, cfg):
|
def capture_pi(image_queue, z1, t1, z2, t2, nx, ny, nz, tend, device_id, live, cfg):
|
||||||
|
from picamerax.array import PiRGBArray
|
||||||
|
from picamerax import PiCamera
|
||||||
# Intialization
|
# Intialization
|
||||||
first = True
|
first = True
|
||||||
slow_CPU = False
|
slow_CPU = False
|
||||||
|
|
Loading…
Reference in New Issue