url probe and fix as part of lang syncing
This commit is contained in:
parent
fc2c79d0cb
commit
c84a0f1519
@ -6,6 +6,20 @@ srcdir="../src"
|
|||||||
langlist=$(ls "$srcdir")
|
langlist=$(ls "$srcdir")
|
||||||
yamlfile="settings.yaml"
|
yamlfile="settings.yaml"
|
||||||
filesync=false
|
filesync=false
|
||||||
|
urlfix=false
|
||||||
|
|
||||||
|
confirm() {
|
||||||
|
if [ "$FORCE" == '-y' ]; then
|
||||||
|
true
|
||||||
|
else
|
||||||
|
read -r -p "$1 [y/N] " response < /dev/tty
|
||||||
|
if [[ $response =~ ^(yes|y|Y)$ ]]; then
|
||||||
|
true
|
||||||
|
else
|
||||||
|
false
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
for overlay in $mdlist; do
|
for overlay in $mdlist; do
|
||||||
board=$(echo "$overlay" | rev | cut -c 4- | rev)
|
board=$(echo "$overlay" | rev | cut -c 4- | rev)
|
||||||
@ -25,11 +39,24 @@ for overlay in $mdlist; do
|
|||||||
echo "adding $board to $dirmd/$yamlfile"
|
echo "adding $board to $dirmd/$yamlfile"
|
||||||
echo "- $board" | tee -a ../src/$dirmd/$yamlfile &> /dev/null
|
echo "- $board" | tee -a ../src/$dirmd/$yamlfile &> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f "$srcdir/$dirmd/overlay/$overlay" ]; then
|
||||||
|
besturl=$(grep "^url: http" "$masterdir/$overlay")
|
||||||
|
langurl=$(grep "^url: http" "$srcdir/$dirmd/overlay/$overlay")
|
||||||
|
if [ "$besturl" != "$langurl" ]; then
|
||||||
|
echo "url in en $overlay is $besturl"
|
||||||
|
echo "url in $dirmd $overlay is $langurl"
|
||||||
|
if confirm "would you like to fix this discrepancy?"; then
|
||||||
|
sed -i "s|^url.*$|$besturl|" "$srcdir/$dirmd/overlay/$overlay"
|
||||||
|
echo "external link was fixed" && urlfix=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
if ! $filesync;then
|
if ! $filesync && ! $urlfix;then
|
||||||
echo "all pending translations are up-to-date"
|
echo "all translations are up-to-date"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -4,6 +4,7 @@ name: I2C
|
|||||||
class: interface
|
class: interface
|
||||||
type: pinout
|
type: pinout
|
||||||
description: Raspberry Pi I2C Anschlüsse
|
description: Raspberry Pi I2C Anschlüsse
|
||||||
|
url: http://www.raspberry-projects.com/pi/programming-in-python/i2c-programming-in-python/using-the-i2c-interface-2
|
||||||
pin:
|
pin:
|
||||||
'3':
|
'3':
|
||||||
name: Data
|
name: Data
|
||||||
@ -49,4 +50,4 @@ DEVICE_BUS = 1
|
|||||||
DEVICE_ADDR = 0x15
|
DEVICE_ADDR = 0x15
|
||||||
bus = smbus.SMBus(DEVICE_BUS)
|
bus = smbus.SMBus(DEVICE_BUS)
|
||||||
bus.write_byte_data(DEVICE_ADDR, 0x00, 0x01)
|
bus.write_byte_data(DEVICE_ADDR, 0x00, 0x01)
|
||||||
```
|
```
|
||||||
|
@ -4,6 +4,7 @@ name: SPI
|
|||||||
class: interface
|
class: interface
|
||||||
type: pinout
|
type: pinout
|
||||||
description: Raspberry Pi SPI Anschlüsse
|
description: Raspberry Pi SPI Anschlüsse
|
||||||
|
url: https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/
|
||||||
pincount: 5
|
pincount: 5
|
||||||
pin:
|
pin:
|
||||||
'11':
|
'11':
|
||||||
|
@ -4,6 +4,7 @@ name: UART
|
|||||||
class: interface
|
class: interface
|
||||||
type: pinout
|
type: pinout
|
||||||
description: Raspberry Pi UART Anschlüsse
|
description: Raspberry Pi UART Anschlüsse
|
||||||
|
url: http://elinux.org/RPi_Serial_Connection
|
||||||
pin:
|
pin:
|
||||||
'8':
|
'8':
|
||||||
name: TXD / Senden
|
name: TXD / Senden
|
||||||
@ -33,4 +34,4 @@ import wiringpi2 as wiringpi
|
|||||||
wiringpi.wiringPiSetup()
|
wiringpi.wiringPiSetup()
|
||||||
serial = wiringpi.serialOpen('/dev/ttyAMA0',9600)
|
serial = wiringpi.serialOpen('/dev/ttyAMA0',9600)
|
||||||
wiringpi.serialPuts(serial,'hello world!')
|
wiringpi.serialPuts(serial,'hello world!')
|
||||||
```
|
```
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
name: WiringPi
|
name: WiringPi
|
||||||
class: interface
|
class: interface
|
||||||
type: pinout
|
type: pinout
|
||||||
url: http://wiringpi.com/
|
url: http://wiringpi.com
|
||||||
page_url: wiringpi
|
page_url: wiringpi
|
||||||
pin:
|
pin:
|
||||||
'3':
|
'3':
|
||||||
|
@ -4,6 +4,7 @@ name: I2C
|
|||||||
class: interface
|
class: interface
|
||||||
type: pinout
|
type: pinout
|
||||||
description: Pines de i2c de Rasberry Pi
|
description: Pines de i2c de Rasberry Pi
|
||||||
|
url: http://www.raspberry-projects.com/pi/programming-in-python/i2c-programming-in-python/using-the-i2c-interface-2
|
||||||
pin:
|
pin:
|
||||||
'3':
|
'3':
|
||||||
name: Datos
|
name: Datos
|
||||||
|
@ -4,6 +4,7 @@ name: SPI
|
|||||||
class: interface
|
class: interface
|
||||||
type: pinout
|
type: pinout
|
||||||
description: Pines SPI Raspberry Pi
|
description: Pines SPI Raspberry Pi
|
||||||
|
url: https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/
|
||||||
pincount: 5
|
pincount: 5
|
||||||
pin:
|
pin:
|
||||||
'11':
|
'11':
|
||||||
|
@ -4,6 +4,7 @@ name: UART
|
|||||||
class: interface
|
class: interface
|
||||||
type: pinout
|
type: pinout
|
||||||
description: Pines de UART de la Raspberry Pi
|
description: Pines de UART de la Raspberry Pi
|
||||||
|
url: http://elinux.org/RPi_Serial_Connection
|
||||||
pin:
|
pin:
|
||||||
'8':
|
'8':
|
||||||
name: TXD / Transmitir
|
name: TXD / Transmitir
|
||||||
|
@ -4,6 +4,7 @@ name: I2C
|
|||||||
class: interface
|
class: interface
|
||||||
type: pinout
|
type: pinout
|
||||||
description: broches i2c de la Raspberry Pi
|
description: broches i2c de la Raspberry Pi
|
||||||
|
url: http://www.raspberry-projects.com/pi/programming-in-python/i2c-programming-in-python/using-the-i2c-interface-2
|
||||||
pin:
|
pin:
|
||||||
'3':
|
'3':
|
||||||
name: Données
|
name: Données
|
||||||
@ -50,4 +51,4 @@ DEVICE_BUS = 1
|
|||||||
DEVICE_ADDR = 0x15
|
DEVICE_ADDR = 0x15
|
||||||
bus = smbus.SMBus(DEVICE_BUS)
|
bus = smbus.SMBus(DEVICE_BUS)
|
||||||
bus.write_byte_data(DEVICE_ADDR, 0x00, 0x01)
|
bus.write_byte_data(DEVICE_ADDR, 0x00, 0x01)
|
||||||
```
|
```
|
||||||
|
@ -4,7 +4,7 @@ name: I2C
|
|||||||
class: interface
|
class: interface
|
||||||
type: pinout
|
type: pinout
|
||||||
description: Raspberry Pi pin i2c
|
description: Raspberry Pi pin i2c
|
||||||
type: info
|
url: http://www.raspberry-projects.com/pi/programming-in-python/i2c-programming-in-python/using-the-i2c-interface-2
|
||||||
pin:
|
pin:
|
||||||
'3':
|
'3':
|
||||||
name: Dati
|
name: Dati
|
||||||
@ -51,4 +51,4 @@ DEVICE_BUS = 1
|
|||||||
DEVICE_ADDR = 0x15
|
DEVICE_ADDR = 0x15
|
||||||
bus = smbus.SMBus(DEVICE_BUS)
|
bus = smbus.SMBus(DEVICE_BUS)
|
||||||
bus.write_byte_data(DEVICE_ADDR, 0x00, 0x01)
|
bus.write_byte_data(DEVICE_ADDR, 0x00, 0x01)
|
||||||
```
|
```
|
||||||
|
@ -4,6 +4,7 @@ name: SPI
|
|||||||
class: interface
|
class: interface
|
||||||
type: pinout
|
type: pinout
|
||||||
description: Pin SPI del Raspberry
|
description: Pin SPI del Raspberry
|
||||||
|
url: https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/
|
||||||
pincount: 5
|
pincount: 5
|
||||||
pin:
|
pin:
|
||||||
'11':
|
'11':
|
||||||
|
@ -4,6 +4,7 @@ name: UART
|
|||||||
class: interface
|
class: interface
|
||||||
type: pinout
|
type: pinout
|
||||||
description: Pin UART del Raspberry
|
description: Pin UART del Raspberry
|
||||||
|
url: http://elinux.org/RPi_Serial_Connection
|
||||||
pin:
|
pin:
|
||||||
'8':
|
'8':
|
||||||
name: TXD / Trasmissione
|
name: TXD / Trasmissione
|
||||||
@ -33,4 +34,4 @@ import wiringpi2 as wiringpi
|
|||||||
wiringpi.wiringPiSetup()
|
wiringpi.wiringPiSetup()
|
||||||
serial = wiringpi.serialOpen('/dev/ttyAMA0',9600)
|
serial = wiringpi.serialOpen('/dev/ttyAMA0',9600)
|
||||||
wiringpi.serialPuts(serial,'ciao mondo!')
|
wiringpi.serialPuts(serial,'ciao mondo!')
|
||||||
```
|
```
|
||||||
|
@ -4,6 +4,7 @@ name: I2C
|
|||||||
class: interface
|
class: interface
|
||||||
type: pinout
|
type: pinout
|
||||||
description: Raspberry Pi i2c pinleri
|
description: Raspberry Pi i2c pinleri
|
||||||
|
url: http://www.raspberry-projects.com/pi/programming-in-python/i2c-programming-in-python/using-the-i2c-interface-2
|
||||||
pin:
|
pin:
|
||||||
'3':
|
'3':
|
||||||
name: Data
|
name: Data
|
||||||
@ -49,4 +50,4 @@ DEVICE_BUS = 1
|
|||||||
DEVICE_ADDR = 0x15
|
DEVICE_ADDR = 0x15
|
||||||
bus = smbus.SMBus(DEVICE_BUS)
|
bus = smbus.SMBus(DEVICE_BUS)
|
||||||
bus.write_byte_data(DEVICE_ADDR, 0x00, 0x01)
|
bus.write_byte_data(DEVICE_ADDR, 0x00, 0x01)
|
||||||
```
|
```
|
||||||
|
@ -4,6 +4,7 @@ name: SPI
|
|||||||
class: interface
|
class: interface
|
||||||
type: pinout
|
type: pinout
|
||||||
description: Raspberry Pi SPI pinleri
|
description: Raspberry Pi SPI pinleri
|
||||||
|
url: https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/
|
||||||
pincount: 5
|
pincount: 5
|
||||||
pin:
|
pin:
|
||||||
'11':
|
'11':
|
||||||
@ -61,12 +62,12 @@ wiringpi.mcp23S17Setup(PIN_BASE,SPI_ADDR)
|
|||||||
# 16 pins including the starting pin
|
# 16 pins including the starting pin
|
||||||
mcp23S17pins = range(PIN_BASE,PIN_BASE+15)
|
mcp23S17pins = range(PIN_BASE,PIN_BASE+15)
|
||||||
for pin in mcp23S17pins:
|
for pin in mcp23S17pins:
|
||||||
wiringpi.pinMode(pin,OUTPUT)
|
wiringpi.pinMode(pin,OUTPUT)
|
||||||
wiringpi.digitalWrite(pin,HIGH)
|
wiringpi.digitalWrite(pin,HIGH)
|
||||||
```
|
```
|
||||||
|
|
||||||
SPI portunuz ayrıca Gordon Henderson'un modifiye AVRDude'una Arduino skeçleri yükleyerek ATmega 328'ye "[bit banging](http://en.wikipedia.org/wiki/Bit_banging)" de yapabilirsiniz.
|
SPI portunuz ayrıca Gordon Henderson'un modifiye AVRDude'una Arduino skeçleri yükleyerek ATmega 328'ye "[bit banging](http://en.wikipedia.org/wiki/Bit_banging)" de yapabilirsiniz.
|
||||||
|
|
||||||
Raspberry Pi'nizin SPI port'unu ATmega'nıza bağlayın ve ATmega'yı Raspberry Pi'nin 3.3v gücüyle besleyip açın. SPI sürücüleri çalıştırmadığınızdan emin olduktan sonra "`avrdude -p m328p -c gpio`" komutu ile bağlantıyı kontrol edin.
|
Raspberry Pi'nizin SPI port'unu ATmega'nıza bağlayın ve ATmega'yı Raspberry Pi'nin 3.3v gücüyle besleyip açın. SPI sürücüleri çalıştırmadığınızdan emin olduktan sonra "`avrdude -p m328p -c gpio`" komutu ile bağlantıyı kontrol edin.
|
||||||
|
|
||||||
ATmega'nız varsa her bir pin için ayrı ayrı tıklayarak nasıl bağlayabileceğinizi öğrenebilirsiniz.
|
ATmega'nız varsa her bir pin için ayrı ayrı tıklayarak nasıl bağlayabileceğinizi öğrenebilirsiniz.
|
||||||
|
@ -4,6 +4,7 @@ name: UART
|
|||||||
class: interface
|
class: interface
|
||||||
type: pinout
|
type: pinout
|
||||||
description: Raspberry Pi UART pinleri
|
description: Raspberry Pi UART pinleri
|
||||||
|
url: http://elinux.org/RPi_Serial_Connection
|
||||||
pin:
|
pin:
|
||||||
'8':
|
'8':
|
||||||
name: TXD / Transmit
|
name: TXD / Transmit
|
||||||
@ -29,4 +30,4 @@ import wiringpi2 as wiringpi
|
|||||||
wiringpi.wiringPiSetup()
|
wiringpi.wiringPiSetup()
|
||||||
serial = wiringpi.serialOpen('/dev/ttyAMA0',9600)
|
serial = wiringpi.serialOpen('/dev/ttyAMA0',9600)
|
||||||
wiringpi.serialPuts(serial,'merhaba dunya')
|
wiringpi.serialPuts(serial,'merhaba dunya')
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user