mirror of
https://github.com/MoHadiShibli/Control4Free.git
synced 2026-10-14 09:01:04 +02:00
Prepare Control4Free 1.2.1 release
This commit is contained in:
1 parent
75743ef24b
commit
bf5fa7e5ab
12 files changed
+92
-72
No files matched your search
+1
-1
@@ -1 +1 @@
|
||||
ko_fi: mohadishibli
|
||||
liberapay: MoHadiShibli
|
||||
+11
-7
@@ -3,16 +3,20 @@
|
||||
Versions follow [Semantic Versioning](https://semver.org): PATCH for fixes, MINOR for features that break
|
||||
nothing, MAJOR for anything people rely on that changes.
|
||||
|
||||
## 1.2.1 — 2026-10-10
|
||||
## 1.2.1 — 2026-10-11
|
||||
|
||||
HDMI-CEC navigation for the PS4 app.
|
||||
|
||||
- Added a TV-remote reader and an Actions menu to the PS4 app for HDMI-CEC navigation with
|
||||
arrows and OK. Includes input recovery, separate Stop confirmation and diagnostic navigation.
|
||||
Handles separate Sony remote Enter/Back/Menu key codes alongside DS4 button bits and retains
|
||||
the last received key in diagnostics. The first PS4 test connected the remote but could not
|
||||
select actions; the follow-up decoding still needs hardware confirmation before publication.
|
||||
See the [HDMI-CEC test guide](docs/hdmi-cec.md).
|
||||
- Use your TV remote to control the PS4 app through HDMI-CEC. Press **OK** to open **Actions**,
|
||||
use the arrows to choose, and press **OK** again. **Back** returns; Stop has a separate confirmation.
|
||||
The diagnostic app also supports remote navigation and retains the last received remote key.
|
||||
See [HDMI-CEC navigation](docs/hdmi-cec.md).
|
||||
- If the app cannot reach PayLoader, it tells you to enable **GoldHEN → Server Settings → Enable
|
||||
PayLoader Server** and retry Start. The setup message now fits on screen, and the installation
|
||||
guide explains when the server is needed.
|
||||
|
||||
Thanks to [NotDev-Kike](https://github.com/MoHadiShibli/Control4Free/issues/3#issuecomment-6103983733)
|
||||
for testing and confirming OK, arrows, Back and service startup with a Samsung TV remote on firmware 11.02.
|
||||
|
||||
## 1.2.0 — 2026-10-09
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<a href="https://github.com/MoHadiShibli/Control4Free/releases/latest"><img src="https://img.shields.io/github/v/release/MoHadiShibli/Control4Free?label=release" alt="Latest release"></a>
|
||||
<a href="https://github.com/MoHadiShibli/Control4Free/actions/workflows/build.yml"><img src="https://github.com/MoHadiShibli/Control4Free/actions/workflows/build.yml/badge.svg" alt="Build"></a>
|
||||
<a href="LICENSE"><img src="https://img.shields.io/badge/license-GPL--3.0-blue" alt="License: GPL v3"></a>
|
||||
<a href="https://ko-fi.com/mohadishibli"><img src="https://img.shields.io/badge/Ko--fi-support%20this%20project-FF5E5B?logo=ko-fi&logoColor=white" alt="Support on Ko-fi"></a>
|
||||
<a href="https://liberapay.com/MoHadiShibli/"><img src="https://img.shields.io/badge/Liberapay-support%20this%20project-F6C915?logo=liberapay&logoColor=black" alt="Support on Liberapay"></a>
|
||||
</p>
|
||||
|
||||
**Use your phone or PC as a PS4 controller: on the home screen, at sign-in, and in games.**
|
||||
@@ -48,7 +48,7 @@ sees a virtual DualShock 4, which provides:
|
||||
light-bar colour, the one the PS4 or the game sets.
|
||||
- **Fast.** Input reaches the console the moment it arrives, at a DualShock 4's own rate while you play.
|
||||
- **An app on the PS4** that shows the address and a QR code, how many controllers are connected, and starts
|
||||
or stops Control4Free.
|
||||
or stops Control4Free. Use a controller or your TV remote through [HDMI-CEC](docs/hdmi-cec.md).
|
||||
- **Starts by itself.** One button in the app sets up GoldHEN's AutoRun, so Control4Free is ready after
|
||||
every restart.
|
||||
- **On your phone's home screen**, like an app.
|
||||
@@ -60,8 +60,8 @@ sees a virtual DualShock 4, which provides:
|
||||
1. Download `Control4Free-<version>.pkg` from the [latest release](https://github.com/MoHadiShibli/Control4Free/releases/latest).
|
||||
2. Install it with GoldHEN's Package Installer: **Settings → Debug Settings → Game → Package Installer**, from a
|
||||
USB drive or `/data/pkg/`.
|
||||
3. Open **Control4Free** from **Library → Applications** and press **Cross**. It sets up auto-start and
|
||||
starts Control4Free.
|
||||
3. Enable **GoldHEN → Server Settings → Enable PayLoader Server**, then open **Control4Free** from
|
||||
**Library → Applications** and press **Cross**. It sets up auto-start and starts Control4Free.
|
||||
4. On your phone or PC, scan the QR code or open the address shown, for example `http://192.168.1.20:4264`.
|
||||
Pick a controller, then choose your user on the PS4.
|
||||
|
||||
@@ -78,6 +78,7 @@ New to GoldHEN packages? The **[installation guide](docs/installation.md)** walk
|
||||
- **[Installation](docs/installation.md)**: requirements, installing, auto-start, updating, uninstalling.
|
||||
- **[Playing](docs/playing.md)**: signing in, touch, keyboard and gamepads, the layout editor, settings.
|
||||
- **[Gamepad mapping](docs/gamepad-mapping.md)**: profiles, calibration and using several input devices together.
|
||||
- **[HDMI-CEC navigation](docs/hdmi-cec.md)**: using your TV remote in the PS4 app.
|
||||
- **[Troubleshooting](docs/troubleshooting.md)**: the messages you might see and what to do about each.
|
||||
- **[How it works](docs/how-it-works.md)**: the virtual-device API, sign-in, and what runs where.
|
||||
- **[Protocol](docs/protocol.md)**: the WebSocket protocol between the page and the console.
|
||||
@@ -87,10 +88,12 @@ New to GoldHEN packages? The **[installation guide](docs/installation.md)** walk
|
||||
|
||||
## Requirements and compatibility
|
||||
|
||||
- A PS4 with GoldHEN v2.4b18.10 or later. Tested on firmware 10.01, 13.02, 13.04 and 13.52; the
|
||||
- A PS4 with GoldHEN v2.4b18.10 or later. Tested on firmware 10.01, 11.02, 13.02, 13.04 and 13.52; the
|
||||
[compatibility table](docs/installation.md#compatibility) lists every firmware and the GoldHEN version it
|
||||
needs.
|
||||
- A phone, tablet or computer with a browser, on the same network as the PS4.
|
||||
- To start the service directly from the app, enable **GoldHEN → Server Settings → Enable PayLoader
|
||||
Server**. AutoRun can start it without this server.
|
||||
- Turn off other GoldHEN controller plugins in games you play with Control4Free. A plugin that takes over a
|
||||
signed-in user's controller can stop games from reading the virtual ones.
|
||||
- A Remote Play session (chiaki-ng, for example) works alongside Control4Free.
|
||||
@@ -121,7 +124,7 @@ Found a bug? Install the diagnostic package from the latest release first, then
|
||||
[open an issue](https://github.com/MoHadiShibli/Control4Free/issues/new/choose) with its screenshots (see
|
||||
[Reporting a problem](docs/troubleshooting.md#reporting-a-problem)). I maintain this project and read every
|
||||
report. If Control4Free is useful to you, you can help keep it going on
|
||||
[Ko-fi](https://ko-fi.com/mohadishibli).
|
||||
[Liberapay](https://liberapay.com/MoHadiShibli/).
|
||||
|
||||
## Credits
|
||||
|
||||
|
||||
+31
-29
@@ -1,18 +1,21 @@
|
||||
# HDMI-CEC navigation — development build
|
||||
# HDMI-CEC navigation
|
||||
|
||||
The development app includes a TV-remote input reader and an **Actions** menu.
|
||||
PS4 testing is in progress; this is not part of the already-published release.
|
||||
It addresses [issue #3](https://github.com/MoHadiShibli/Control4Free/issues/3), where a Samsung
|
||||
TV remote navigates the PS4 home screen but stops responding inside Control4Free.
|
||||
Use your TV remote to start and stop Control4Free, manage auto-start, and navigate the PS4 app.
|
||||
The normal and diagnostic packages include an **Actions** menu for remotes.
|
||||
|
||||
## Using the remote
|
||||
## Set up
|
||||
|
||||
Enable **Settings → System → Enable HDMI Device Link** on the PS4 and HDMI-CEC on the TV.
|
||||
The setting's name depends on the TV model. First check that the
|
||||
remote's arrows and OK can navigate the PS4 home screen. TV model and connection-chain
|
||||
compatibility varies; see [Sony's HDMI Device Link guide](https://manuals.playstation.net/document/en/ps4/settings/devicelink.html).
|
||||
remote's arrows and OK can navigate the PS4 home screen. TV and receiver/switch compatibility
|
||||
varies; see [Sony's HDMI Device Link guide](https://manuals.playstation.net/document/en/ps4/settings/devicelink.html).
|
||||
|
||||
In the development app:
|
||||
To start the service directly from the app, enable **GoldHEN → Server Settings → Enable
|
||||
PayLoader Server**. If the app says PayLoader did not answer, enable it and retry Start.
|
||||
The app cannot enable this GoldHEN setting automatically. AutoRun can start the service
|
||||
after a restart without the server; see [Installation](installation.md).
|
||||
|
||||
## Using the remote
|
||||
|
||||
1. Press **OK** to open **Actions**. A Menu key can also open it if exposed by the PS4.
|
||||
2. Use the arrows to choose an action, then press **OK** again. The menu includes setup/start,
|
||||
@@ -26,7 +29,9 @@ Existing DualShock 4 shortcuts work outside the menu. Its D-pad can also open an
|
||||
Actions in the normal app. Service operations finish before another operation or Close is
|
||||
available. Release held buttons after opening the app, reconnecting or returning to it.
|
||||
|
||||
In the diagnostic app, **Left/Right** change pages and **Up/Down** scroll while the menu is
|
||||
## Diagnostic app
|
||||
|
||||
**Left/Right** change pages and **Up/Down** scroll while the menu is
|
||||
closed. **OK** opens Actions, which also includes **Capture kernel log**. Menu arrows move
|
||||
the selection without changing the page underneath it. The Summary page reports DS4 and
|
||||
TV-remote input status; a ready source shows its navigation button mask, and a failed source
|
||||
@@ -34,26 +39,23 @@ shows the native error code. It also retains the last active remote sample's key
|
||||
button mask, so a short press remains visible after you release it. These values describe
|
||||
the PS4's input data; they are not HDMI-CEC wire command numbers.
|
||||
|
||||
The first test on firmware 11.02 with a Samsung UN55NU7090P and AA59-00818A remote showed
|
||||
a connected remote reader and an open Actions menu, but OK did not select an action. The
|
||||
follow-up build handles a separate Sony remote Enter/Back/Menu key field alongside ordinary
|
||||
DS4 button bits. These codes are used by [PS5 SDL's remote input implementation](https://github.com/ps5-payload-dev/SDL/blob/ee4c47dc0d617b3bc8f35108f9956baf228a1322/src/video/ps5/SDL_ps5remote.c); their behavior on this
|
||||
PS4 setup still needs confirmation. If OK fails again, press and release OK, then photograph
|
||||
the Summary page or send its saved diagnostic report with the retained key and raw mask.
|
||||
If a remote fails inside the app, press and release the affected button, then photograph
|
||||
Summary or save its report. See [Reporting a problem](troubleshooting.md#reporting-a-problem).
|
||||
|
||||
## Test before release
|
||||
## Confirmed setup and limits
|
||||
|
||||
Use the locally built normal and diagnostic packages. Record the PS4 firmware, GoldHEN
|
||||
version, TV model and any receiver/switch between the TV and console. Verify:
|
||||
| TV | Remote | PS4 firmware | GoldHEN | Confirmed behavior |
|
||||
|---|---|---|---|---|
|
||||
| Samsung UN55NU7090P | AA59-00818A (TM1240) | 11.02 | v2.4b18.12 | OK, arrows, RETURN/Back and service startup with PayLoader Server enabled |
|
||||
|
||||
- App launch and arrows/OK with physical DS4s disconnected, then with a DS4 connected.
|
||||
- Setup/start, auto-start on/off, updating an older auto-start copy, Stop confirmation,
|
||||
Resume and Close. Holding OK must not activate an action twice.
|
||||
- Diagnostic page navigation, scrolling and action selection.
|
||||
- Switching the TV's HDMI input away and back, returning from the PS4 home screen, and rest/wake.
|
||||
- Recovery after the remote becomes unavailable; a held button must be released before it acts again.
|
||||
This setup was [confirmed by NotDev-Kike](https://github.com/MoHadiShibli/Control4Free/issues/3#issuecomment-6103983733)
|
||||
with no physical DS4 connected. Other TV/remote models, simultaneous DS4 use, HDMI input
|
||||
switching and rest/wake behavior still need hardware reports. Held-button handling, recovery
|
||||
and Stop confirmation have automated tests; their hardware behavior was not separately reported.
|
||||
|
||||
Complete TV-remote navigation remains unverified until these checks pass on a PS4. The app reads the system's
|
||||
remote-control stream independently of DS4 input; it does not change the console's HDMI
|
||||
settings, create virtual controllers, or forward TV keys to games or browser controllers.
|
||||
Media/color keys and TV power/volume control are outside this implementation.
|
||||
The app reads the PS4's remote-control stream independently of DS4 input. TV keys control
|
||||
the app only. Media/color keys and TV power/volume control are outside this implementation.
|
||||
|
||||
For another setup, report the TV and remote models, PS4 firmware, GoldHEN version, any
|
||||
receiver/switch between TV and console, and which buttons work. Diagnostic screenshots help
|
||||
identify inputs the PS4 exposes.
|
||||
+13
-6
@@ -14,6 +14,9 @@ Control4Free comes in two pieces:
|
||||
run ELF payloads like Control4Free reliably, and have no auto-start. See [Compatibility](#compatibility) for
|
||||
each firmware.
|
||||
- **Debug Settings** turned on in GoldHEN, for the Package Installer.
|
||||
- **PayLoader Server** enabled for starting the service directly from the app:
|
||||
**GoldHEN → Server Settings → Enable PayLoader Server**. AutoRun and Payloader LaunchPad can start the
|
||||
service without this server.
|
||||
- A phone, tablet or computer with a modern browser, on the same network as the PS4.
|
||||
|
||||
## Compatibility
|
||||
@@ -25,12 +28,13 @@ Control4Free's start-up code, but nobody has tried them yet.
|
||||
| Firmware | GoldHEN | Status |
|
||||
|---|---|---|
|
||||
| 10.01 | v2.4b18.10 or later | **Tested** (v2.4b18.10) |
|
||||
| 11.02 | v2.4b18.10 or later | **Tested** (v2.4b18.12) |
|
||||
| 13.02, 13.04 | v2.4b18.12 or later | **Tested** (v2.4b18.12) |
|
||||
| 13.52 | v2.4b18.11 or later | **Tested** (v2.4b18.12), with Control4Free 1.1.1 or later |
|
||||
| 13.50 | v2.4b18.12 or later | Not tested |
|
||||
| 13.00 | v2.4b18.10 or later | Not tested |
|
||||
| 12.00, 12.02, 12.50, 12.52 | v2.4b18.10 or later | Not tested |
|
||||
| 5.05, 6.71, 6.72, 7.0x, 7.5x, 8.0x, 8.5x, 9.0x, 9.5x, 9.60, 10.00, 10.50, 10.70, 10.71, 11.0x, 11.5x | v2.4b18.10 or later | Not tested |
|
||||
| 5.05, 6.71, 6.72, 7.0x, 7.5x, 8.0x, 8.5x, 9.0x, 9.5x, 9.60, 10.00, 10.50, 10.70, 10.71, other 11.0x, 11.5x | v2.4b18.10 or later | Not tested |
|
||||
|
||||
The older a firmware, the less certain it is that the PS4's virtual-controller API behaves as on the tested
|
||||
ones. If you try an untested firmware, an issue saying whether it worked helps others, with a
|
||||
@@ -50,13 +54,15 @@ The app appears in **Library → Applications**.
|
||||
|
||||
## First start
|
||||
|
||||
Open **Control4Free** and press **Cross**. The app:
|
||||
In GoldHEN, open **Server Settings** and check **Enable PayLoader Server**. Then open **Control4Free** and
|
||||
press **Cross**. The app:
|
||||
|
||||
1. copies the service to `/data/payloads/control4free.elf`;
|
||||
2. adds it to GoldHEN's AutoRun list, `/data/GoldHEN/payloads.ini`, so GoldHEN starts it every time it
|
||||
loads;
|
||||
3. starts it straight away if GoldHEN's **PayLoader** is on. If it isn't, turn PayLoader on in GoldHEN's
|
||||
settings and press **Cross** again. AutoRun also starts Control4Free each time GoldHEN loads.
|
||||
3. starts it straight away through GoldHEN's PayLoader Server. If the server is unavailable, auto-start
|
||||
stays enabled; enable PayLoader Server and retry, or let AutoRun start Control4Free the next time
|
||||
GoldHEN loads.
|
||||
|
||||
Once it's running, the app shows the address to open, for example `http://192.168.1.20:4264`, and a QR code
|
||||
for your phone's camera. The PS4 also shows the address in a notification when the service starts.
|
||||
@@ -78,8 +84,9 @@ screen, that's fine too: the app doesn't get in the way of Control4Free.
|
||||
| **Square**, then **Cross** | Stops Control4Free and disconnects every controller. |
|
||||
| **Circle** | Closes the app. Control4Free keeps running without it. |
|
||||
|
||||
TV-remote navigation is being tested in the development app. See the
|
||||
[HDMI-CEC test guide](hdmi-cec.md); the published package does not yet include it.
|
||||
With a TV remote over HDMI-CEC, press **OK** to open **Actions**, use the arrows to choose,
|
||||
and press **OK** again. **Back** returns. See [HDMI-CEC navigation](hdmi-cec.md) for setup
|
||||
and compatibility.
|
||||
|
||||
## Updating
|
||||
|
||||
|
||||
@@ -129,8 +129,9 @@ has loaded, and check it has a controller under **Gamepads on this device**.
|
||||
|
||||
## In the app on the PS4
|
||||
|
||||
**"PayLoader did not answer."** Turn on GoldHEN's PayLoader and press **Cross** again, or restart the PS4 and
|
||||
run the jailbreak: with auto-start on, Control4Free starts by itself.
|
||||
**"PayLoader did not answer."** Open **GoldHEN → Server Settings → Enable PayLoader Server**, check the
|
||||
option and retry **Start** in the app, or restart the PS4 and run the jailbreak: with auto-start on,
|
||||
Control4Free starts by itself.
|
||||
|
||||
**"Control4Free is not responding."** Wait a few seconds after the PS4 wakes from rest mode, then press
|
||||
**Cross** again. If it stays stuck, restart the PS4 and run the jailbreak.
|
||||
|
||||
+2
-2
@@ -371,8 +371,8 @@ static char *c4fSummary(const C4fDiagState *s)
|
||||
">> here and take screenshots of pages 1 and 2: page 2 lists every connection it saw.\n",
|
||||
s->version, s->address[0] ? s->address : "the PS4's address with :4264");
|
||||
else if (c4fStarted && c4fContains(c4fStartMessage, "PayLoader did not answer"))
|
||||
c4fAdd(&t, ">> GoldHEN's PayLoader (port 9090) did not take the payload. Turn PayLoader on in GoldHEN's\n"
|
||||
">> settings, then press Cross again.\n");
|
||||
c4fAdd(&t, ">> GoldHEN's PayLoader Server (port 9090) did not take the payload. Open GoldHEN > Server Settings,\n"
|
||||
">> check Enable PayLoader Server, then retry Start.\n");
|
||||
else if (c4fStarted && c4fStartResult == -2 && !c4fLogChanged)
|
||||
c4fAdd(&t, ">> The payload was handed to PayLoader, but Control4Free's own code never ran (it wrote no log).\n"
|
||||
">> PayLoader did not run it, or it stopped while starting up on this firmware. The kernel log\n"
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ static int c4fSetUp(char *message, size_t size)
|
||||
result = c4fLauncherStart(payload, payloadSize, started, sizeof(started));
|
||||
if (result == 0) snprintf(message, size, "Set up and running. GoldHEN will also start it after each restart.");
|
||||
else if (result == -2) snprintf(message, size, "%s", started);
|
||||
else snprintf(message, size, "Auto-start is on: Control4Free starts the next time GoldHEN loads. %s", started);
|
||||
else snprintf(message, size, "Auto-start is on. %s", started);
|
||||
return result == -2 ? -2 : 0;
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -444,13 +444,13 @@ static C4fLook c4fLookFor(const C4fLauncherScreen *s, char *meta, size_t metaSiz
|
||||
meta, C4F_OK, C4F_ACCENT, 1 };
|
||||
} else if (s->running == 0 && s->autorun == C4F_AUTORUN_ON) {
|
||||
look = (C4fLook){ "Stopped", "Start Control4Free",
|
||||
"It starts with GoldHEN after each restart. Turn on GoldHEN's PayLoader, then choose "
|
||||
"Start Control4Free in Actions or press Cross.",
|
||||
"It starts with GoldHEN after each restart. To start now, enable GoldHEN's PayLoader "
|
||||
"Server and press Cross.",
|
||||
"Not running", C4F_FAINT, C4F_FAINT, 0 };
|
||||
} else if (s->running == 0) {
|
||||
look = (C4fLook){ "Stopped", "Set up Control4Free",
|
||||
"Choose Set up and start in Actions, or press Cross. GoldHEN will start Control4Free "
|
||||
"each time it loads; it starts now if GoldHEN's PayLoader is on.",
|
||||
"Press Cross to set up auto-start. To start Control4Free now, enable GoldHEN's "
|
||||
"PayLoader Server.",
|
||||
"Not running", C4F_FAINT, C4F_FAINT, 0 };
|
||||
}
|
||||
return look;
|
||||
@@ -602,7 +602,7 @@ void c4fDrawLauncher(uint32_t *pixels, const C4fLauncherScreen *s)
|
||||
if (mismatch) {
|
||||
snprintf(versions, sizeof(versions), "Installed %s; running %s", C4F_LAUNCHER_VERSION, s->runningVersion);
|
||||
panelTitle = versions;
|
||||
panelText = "Choose Stop in Actions, confirm, then Start to apply this app's version. Square, Cross, then Cross also works. All players disconnect.";
|
||||
panelText = "Press Square, then Cross to stop, and Cross again to start this app's version. All players disconnect.";
|
||||
panelDot = C4F_WARN;
|
||||
} else if (s->autorun == C4F_AUTORUN_ON) {
|
||||
panelTitle = "Starts by itself with GoldHEN";
|
||||
@@ -611,11 +611,11 @@ void c4fDrawLauncher(uint32_t *pixels, const C4fLauncherScreen *s)
|
||||
panelDot = C4F_OK;
|
||||
} else if (s->autorun == C4F_AUTORUN_OUTDATED) {
|
||||
panelTitle = "Auto-start uses an older Control4Free";
|
||||
panelText = "Choose Update auto-start in Actions or press Triangle. GoldHEN uses this version after the next restart.";
|
||||
panelText = "Press Triangle to update auto-start. GoldHEN uses this version after the next restart.";
|
||||
panelDot = C4F_WARN;
|
||||
} else if (s->autorun == C4F_AUTORUN_OFF) {
|
||||
panelTitle = "Auto-start is off";
|
||||
panelText = "Choose Turn auto-start on in Actions or press Triangle. GoldHEN then starts Control4Free each time it loads.";
|
||||
panelText = "Press Triangle to turn auto-start on. GoldHEN then starts Control4Free each time it loads.";
|
||||
} else {
|
||||
panelTitle = "Auto-start status unknown";
|
||||
panelText = s->autorunNote[0] ? s->autorunNote : "Checking with GoldHEN...";
|
||||
|
||||
+5
-5
@@ -239,10 +239,10 @@ int c4fLauncherStart(const unsigned char *payload, size_t payloadSize, char *mes
|
||||
const char *targets[2];
|
||||
int count = c4fTargets(targets), fd = -1;
|
||||
for (int i = 0; i < count && fd < 0; i++) fd = c4fConnect(targets[i], C4F_PAYLOADER_PORT);
|
||||
if (fd < 0) { snprintf(message, size, "PayLoader did not answer (errno %d). Turn it on in GoldHEN, then choose Start in Actions or press Cross.", errno); return -1; }
|
||||
if (fd < 0) { snprintf(message, size, "PayLoader did not answer (errno %d). Enable PayLoader Server in GoldHEN > Server Settings, then retry Start.", errno); return -1; }
|
||||
int failed = c4fSendAll(fd, payload, payloadSize, c4fLauncherTimeMs() + 10000);
|
||||
shutdown(fd, SHUT_WR); close(fd);
|
||||
if (failed) { snprintf(message, size, "The transfer to PayLoader broke off. Choose Start in Actions or press Cross to retry."); return -2; }
|
||||
if (failed) { snprintf(message, size, "The transfer to PayLoader broke off. Retry Start."); return -2; }
|
||||
uint64_t deadline;
|
||||
deadline = c4fLauncherTimeMs() + 20000;
|
||||
while (c4fLauncherTimeMs() < deadline) {
|
||||
@@ -251,7 +251,7 @@ int c4fLauncherStart(const unsigned char *payload, size_t payloadSize, char *mes
|
||||
}
|
||||
usleep(250000);
|
||||
}
|
||||
snprintf(message, size, "Sent, but Control4Free did not start (%s). Choose Start in Actions or press Cross to retry.", c4fProblem);
|
||||
snprintf(message, size, "Sent, but Control4Free did not start (%s). Retry Start.", c4fProblem);
|
||||
/* Sending again is safe: a copy that did start holds the payload's
|
||||
* instance lock, so a second one quits at once. */
|
||||
return -2;
|
||||
@@ -261,7 +261,7 @@ int c4fLauncherStop(char *message, size_t size)
|
||||
{
|
||||
C4fServiceStatus status;
|
||||
int probe = c4fLauncherProbe(&status);
|
||||
if (probe == 0) { snprintf(message, size, "Stopped. Choose Start in Actions or press Cross to start it again."); return 0; }
|
||||
if (probe == 0) { snprintf(message, size, "Stopped. Ready to start again."); return 0; }
|
||||
if (probe != 1 && !c4fReached) { snprintf(message, size, "The app cannot reach Control4Free (%s). Stop it on its controller page.", c4fProblem); return -1; }
|
||||
if (probe != 1) { snprintf(message, size, "This copy does not answer the app (%s). Stop it on its controller page.", c4fProblem); return -1; }
|
||||
char reply[256];
|
||||
@@ -269,7 +269,7 @@ int c4fLauncherStop(char *message, size_t size)
|
||||
if (ret != 1) { snprintf(message, size, "Stop was not confirmed (%s). Check the controller page.", c4fProblem); return -1; }
|
||||
uint64_t deadline = c4fLauncherTimeMs() + 5000;
|
||||
while (c4fLauncherTimeMs() < deadline) {
|
||||
if (c4fLauncherProbe(&status) == 0) { snprintf(message, size, "Stopped. Choose Start in Actions or press Cross to start it again."); return 0; }
|
||||
if (c4fLauncherProbe(&status) == 0) { snprintf(message, size, "Stopped. Ready to start again."); return 0; }
|
||||
usleep(100000);
|
||||
}
|
||||
snprintf(message, size, "Still stopping. Wait a moment, then try again."); return -1;
|
||||
|
||||
@@ -185,14 +185,14 @@ def main():
|
||||
sys.path.insert(0, str(ROOT / 'tools'))
|
||||
import package_launcher as package
|
||||
package.build_art_tool()
|
||||
for state in ('setup', 'running', 'stopped', 'outdated', 'mismatch', 'confirm', 'busy', 'locked', 'unknown',
|
||||
for state in ('setup', 'running', 'stopped', 'payloader-unavailable', 'outdated', 'mismatch', 'confirm', 'busy', 'locked', 'unknown',
|
||||
'remote-actions-stopped', 'remote-actions-running', 'remote-confirm-cancel',
|
||||
'remote-confirm-stop', 'remote-actions-busy', 'remote-actions-unavailable'):
|
||||
png = ROOT / f'build/launcher-preview-{state}.png'
|
||||
package.render(['screen', state], png, 1920, 1080)
|
||||
assert png.stat().st_size > 50000, png
|
||||
package.build_art_tool(diagnostic=True)
|
||||
for state in ('remote-actions-diag', 'remote-confirm-diag', 'remote-input-diag'):
|
||||
for state in ('remote-actions-diag', 'remote-confirm-diag', 'remote-input-diag', 'payloader-unavailable-diag'):
|
||||
png = ROOT / f'build/launcher-preview-{state}.png'
|
||||
package.render(['screen', state], png, 1920, 1080, diagnostic=True)
|
||||
assert png.stat().st_size > 50000, png
|
||||
|
||||
@@ -71,7 +71,9 @@ int main(int argc, char **argv)
|
||||
s.autorun = C4F_AUTORUN_OFF; message = "Not running.";
|
||||
} else if (!strcmp(state, "stopped") || !strcmp(state, "remote-actions-stopped") ||
|
||||
!strcmp(state, "remote-actions-diag") || !strcmp(state, "remote-input-diag")) {
|
||||
message = "Stopped. Choose Start in Actions or press Cross to start it again.";
|
||||
message = "Stopped. Ready to start again.";
|
||||
} else if (!strcmp(state, "payloader-unavailable") || !strcmp(state, "payloader-unavailable-diag")) {
|
||||
message = "Auto-start is on. PayLoader did not answer (errno 61). Enable PayLoader Server in GoldHEN > Server Settings, then retry Start.";
|
||||
} else if (!strcmp(state, "busy") || !strcmp(state, "remote-actions-busy")) {
|
||||
s.running = -1; s.busy = 1; s.autorun = C4F_AUTORUN_UNKNOWN; message = "Setting up Control4Free. Please wait...";
|
||||
} else if (!strcmp(state, "locked") || !strcmp(state, "remote-actions-unavailable")) {
|
||||
@@ -97,15 +99,16 @@ int main(int argc, char **argv)
|
||||
uint32_t *pixels = calloc((size_t)C4F_SCREEN_WIDTH * C4F_SCREEN_HEIGHT, sizeof(uint32_t));
|
||||
if (!pixels) return 2;
|
||||
#ifdef C4F_DIAG
|
||||
if (!strcmp(state, "remote-input-diag")) {
|
||||
if (!strcmp(state, "remote-input-diag") || !strcmp(state, "payloader-unavailable-diag")) {
|
||||
snprintf(s.inputNote, sizeof(s.inputNote),
|
||||
"DS4: disconnected (0x00000000); TV remote: ready (0x00000000), last key 0x0d / raw 0x00000000");
|
||||
char summary[512];
|
||||
char summary[768];
|
||||
snprintf(summary, sizeof(summary),
|
||||
">> Example input data for layout review.\n\nConsole\n"
|
||||
" system software: example\n\nThis app\n version %s\n"
|
||||
" input: %s\n\nService (port 4264)\n not running\n\n"
|
||||
"Auto-start\n state: on\n", C4F_LAUNCHER_VERSION, s.inputNote);
|
||||
"Auto-start\n state: on\n\nLast start from this app\n message: %s\n",
|
||||
C4F_LAUNCHER_VERSION, s.inputNote, s.message);
|
||||
c4fDiagPreviewPage(0, summary);
|
||||
}
|
||||
c4fDrawDiag(pixels, &s);
|
||||
|
||||
Reference in new issue
Block a user