Skip to content

Commit

Permalink
Update deprecated Hugo value
Browse files Browse the repository at this point in the history
  • Loading branch information
FDelporte committed Oct 24, 2024
1 parent 07b43bc commit fcc6962
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
10 changes: 6 additions & 4 deletions content/examples/jbang/pixelblaze_output_expander.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Before proceeding with this example, make sure that you have a Raspberry Pi prep

Jeff Vyduna and Ben Hencke of ElectroMage, the creators of Pixelblaze, provided example Java code for this project. The serial data format is [documented on GitHub](https://github.com/simap/pixelblaze_output_expander/tree/v3.x). What the code is doing in short:

* Open serial communication to `/dev/ttyS0`. Pi5 uses "/dev/ttyAMA0"
* Open serial communication. Depending on the type of board and the connection you are using (GPIO pin, or other serial connection), this can be a different port. Most probably it will be `/dev/ttyS0` (Raspberry Pi 4 or earlier), or `/dev/ttyAMA0` (Raspberry Pi 5).
* Use BaudRate `2000000`, this is a hard requirement for the PBOE.
* Send a byte array of RGB values for each LED.
* Send a `drawAll` command to put the values on the LEDs.
Expand Down Expand Up @@ -275,11 +275,13 @@ The main method needs to initialize the helper and contains a helper method to s
private static PixelBlazeOutputExpanderHelper helper;

public static void main(String[] args) throws InterruptedException {
// Depending on the type of board and the connection you are using
// (GPIO pin, or other serial connection), this can be a different port.
// Most probably it will be `/dev/ttyS0` (Raspberry Pi 4 or earlier),
// or `/dev/ttyAMA0` (Raspberry Pi 5).
helper = new PixelBlazeOutputExpanderHelper("/dev/ttyS0");
// Pi5 uses "/dev/ttyAMA0"
// helper = new PixelBlazeOutputExpanderHelper("/dev/ttyAMA0");

// RGB commands will be added here
// RGB commands will be added here

helper.closePort();
}
Expand Down
4 changes: 4 additions & 0 deletions content/examples/jbang/pixelblaze_output_expander_javafx.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ private PixelBlazeOutputExpanderHelper helper;

@Override
public void start(Stage stage) {
// Depending on the type of board and the connection you are using
// (GPIO pin, or other serial connection), this can be a different port.
// Most probably it will be `/dev/ttyS0` (Raspberry Pi 4 or earlier),
// or `/dev/ttyAMA0` (Raspberry Pi 5).
helper = new PixelBlazeOutputExpanderHelper("/dev/ttyS0");

VBox holder = new VBox();
Expand Down
2 changes: 1 addition & 1 deletion themes/hugo-theme-learn/layouts/partials/logo.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<a id="logo" href='{{ (cond (and (ne .Site.Params.landingPageURL nil) (.Site.IsMultiLingual)) .Site.Params.landingPageURL "/") }}'>
<a id="logo" href='{{ (cond (and (ne .Site.Params.landingPageURL nil) (hugo.IsMultilingual)) .Site.Params.landingPageURL "/") }}'>
<img src="/assets/pi4j-header.png" />
</a>
6 changes: 3 additions & 3 deletions themes/hugo-theme-learn/layouts/partials/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section id="homelinks">
<ul>
<li>
<a class="padding" href='{{ (cond (and (ne .Site.Params.landingPageURL nil) (.Site.IsMultiLingual)) .Site.Params.landingPageURL "/") }}'>{{ safeHTML (cond (ne .Site.Params.landingPageName nil) .Site.Params.landingPageName "<i class='fas fa-home'></i> Home") }}</a>
<a class="padding" href='{{ (cond (and (ne .Site.Params.landingPageURL nil) (hugo.IsMultilingual)) .Site.Params.landingPageURL "/") }}'>{{ safeHTML (cond (ne .Site.Params.landingPageName nil) .Site.Params.landingPageName "<i class='fas fa-home'></i> Home") }}</a>
</li>
</ul>
</section>
Expand Down Expand Up @@ -48,11 +48,11 @@ <h3>{{ if not $disableShortcutsTitle}}{{ T "Shortcuts-Title"}}{{ end }}</h3>
</section>
{{end}}

{{ if or .Site.IsMultiLingual $showvisitedlinks }}
{{ if or hugo.IsMultilingual $showvisitedlinks }}
<section id="prefooter">
<hr/>
<ul>
{{ if and .Site.IsMultiLingual (not .Site.Params.DisableLanguageSwitchingButton)}}
{{ if and hugo.IsMultilingual (not .Site.Params.DisableLanguageSwitchingButton)}}
<li>
<a class="padding">
<i class="fas fa-language fa-fw"></i>
Expand Down

0 comments on commit fcc6962

Please sign in to comment.