This commit is contained in:
Ivan Zorin
2025-02-07 05:19:32 +03:00
7 changed files with 61 additions and 28 deletions

View File

@@ -215,7 +215,7 @@ jobs:
steps: steps:
- name: Install dependencies (apk) - name: Install dependencies (apk)
run: apk add --no-cache git run: apk add --no-cache git bash grep
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
@@ -227,4 +227,4 @@ jobs:
run: git config --global --add safe.directory /__w/IronOS/IronOS && git config --global safe.directory "$GITHUB_WORKSPACE" run: git config --global --add safe.directory /__w/IronOS/IronOS && git config --global safe.directory "$GITHUB_WORKSPACE"
- name: Check and verify documentation - name: Check and verify documentation
run: /bin/sh ./scripts/deploy.sh docs run: ./scripts/deploy.sh docs

View File

@@ -149,7 +149,7 @@ test-md:
@echo "" @echo ""
@echo "---- Checking documentation... ----" @echo "---- Checking documentation... ----"
@echo "" @echo ""
@/bin/sh ./scripts/deploy.sh docs @./scripts/deploy.sh docs
# shell style & linter check (github CI version of shellcheck is more recent than alpine one so the latter may not catch some policies) # shell style & linter check (github CI version of shellcheck is more recent than alpine one so the latter may not catch some policies)
test-sh: test-sh:

View File

@@ -139,6 +139,22 @@ After powering on the device for the first time with _IronOS_ installed and havi
Additional details are described in the [menu information](https://ralim.github.io/IronOS/Menu/). Additional details are described in the [menu information](https://ralim.github.io/IronOS/Menu/).
## Remote Control
### Pinecil V2 only
Pinecil V2 has [_Bluetooth Low Energy_ module](https://ralim.github.io/IronOS/Bluetooth), which is supported by _IronOS_ since `2.21` release to control some of the settings using additional tools like [PineSAM](https://github.com/builder555/PineSAM) or [PineTool](https://github.com/lachlanbell/PineTool). In `2.21` and `2.22` releases the module was _on_ by default. However, **_Bluetooth_ is turned off in the settings by default in current `dev` builds and for the next releases** [due to security concerns](#1856).[^ble]
To enable _Bluetooth_ back:
- go to _Settings_ menu;
- press `-/B` button four times to scroll the menu for `Advanced settings`;
- press `+/A` button to open submenu;
- press `+/A` button to toggle/enable _Bluetooth_ feature;
- press `-/B` **and hold it** for just more than five seconds to exit from the _Settings_ menu.
[^ble]:
This is related only to situations when a user restores default settings using menu, or when _IronOS_ update is taking place on a new device or on a device with a previous firmware version.
## Translations ## Translations
Is your preferred language missing localisation of some of the text? Is your preferred language missing localisation of some of the text?
@@ -175,6 +191,6 @@ Other components such as _FreeRTOS_ and _USB-PD_ have their own licenses.
## Commercial Use ## Commercial Use
This software is provided "AS IS", so I cannot provide any commercial support for the firmware. This software is provided _**"AS IS"**_, so I cannot provide any commercial support for the firmware.
However, you are more than welcome to distribute links to the firmware or provide hardware with this firmware. However, you are more than welcome to distribute links to the firmware or provide hardware with this firmware.
**Please do not re-host the files, but rather link to this page, so that there are no old versions of the firmware scattered around**. **Please do not re-host the files, but rather link to this page, so that there are no old versions of the firmware scattered around**.

View File

@@ -137,7 +137,7 @@
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Quvvat\nmanbai", "displayText": "Quvvat\nmanbai",
"description": "Batareya haddan tashqari zaryadsizlanishini oldini olish uchun kuchlanish chegarasini o'rnatish (DC 10V) (S=3.3V har bir yacheyka uchun, quvvat PWR chegarasini o'chirish)" "description": "Batareya haddan tashqari zaryadsizlanishini oldini olish uchun kuchlanish chegarasini o'rnatish (DC 10V) (S=3.3V har bir yacheyka uchun, quvvat PWR chegarasini o'chirish)"
}, },
"MinVolCell": { "MinVolCell": {
"displayText": "Minimal\nkuchlanish", "displayText": "Minimal\nkuchlanish",

View File

@@ -95,9 +95,10 @@ docs_links()
{ {
ver_git="$(git tag -l | sort | grep -e "^v" | grep -v "rc" | tail -1)" ver_git="$(git tag -l | sort | grep -e "^v" | grep -v "rc" | tail -1)"
md="README.md" md="README.md"
test -f "${md}" || (echo "deploy.sh: docs_links: ERROR with the project directory structure!" && exit 1)
ver_md="$(grep -c "${ver_git}" "${md}")" ver_md="$(grep -c "${ver_git}" "${md}")"
ret=0 ret=0
if [ "${ver_md}" -ne 0 ]; then if [ "${ver_md}" -eq 0 ]; then
ret=1 ret=1
echo "Please, update mention & links in ${md} inside Builds section for release builds with version ${ver_git}." echo "Please, update mention & links in ${md} inside Builds section for release builds with version ${ver_git}."
fi; fi;
@@ -108,16 +109,38 @@ docs_links()
build_langs() build_langs()
{ {
mk="../source/Makefile" mk="../source/Makefile"
cd Translations/ || exit 1 cd Translations/ || (echo "deploy.sh: build_langs: ERROR with the project directory structure!" && exit 1)
langs="$(echo "$(find ./*.json | sed -ne 's,^\./translation_,,; s,\.json$,,; /[A-Z]/p' ; sed -ne 's/^ALL_LANGUAGES=//p;' "${mk}")" | sed 's, ,\n,g; s,\r,,g' | sort | uniq -u)" langs="$(echo "$(find ./*.json | sed -ne 's,^\./translation_,,; s,\.json$,,; /[A-Z]/p' ; sed -ne 's/^ALL_LANGUAGES=//p;' "${mk}")" | sed 's, ,\n,g; s,\r,,g' | sort | uniq -u)"
ret=0
if [ -n "${langs}" ]; then if [ -n "${langs}" ]; then
ret=1
echo "It seems there is mismatch between supported languages and enabled builds." echo "It seems there is mismatch between supported languages and enabled builds."
echo "Please, check files in Translations/ and ALL_LANGUAGES variable in source/Makefile for:" echo "Please, check files in Translations/ and ALL_LANGUAGES variable in source/Makefile for:"
echo "${langs}" echo "${langs}"
return 1
fi; fi;
return "${ret}" cd ..
echo -ne "\n"
grep -nH $'\11' Translations/translation*.json
ret="${?}"
if [ "${ret}" -eq 0 ]; then
echo -ne "\t^^^^\t^^^^\n"
echo "Please, remove any tabs as indention from json file(s) in Translations/ directory (see the exact files & lines in the list above)."
echo "Use spaces only to indent in the future, please."
echo -ne "\n"
return 1
fi;
grep -nEH -e "^( {1}| {3}| {5}| {7}| {9}| {11})[^ ]" Translations/translation*.json
ret="${?}"
if [ "${ret}" -eq 0 ]; then
echo -ne "\t^^^^\t^^^^\n"
echo "Please, remove any odd amount of extra spaces as indention from json file(s) in Translations/ directory (see the exact files & lines in the list above)."
echo "Use even amount of spaces to indent in the future, please (two actual spaces per one indent, not tab)."
echo -ne "\n"
return 1
fi;
return 0
} }
# Helper function to check code style using clang-format & grep/sed custom parsers: # Helper function to check code style using clang-format & grep/sed custom parsers:

View File

@@ -11,6 +11,7 @@
#include "cmsis_os.h" #include "cmsis_os.h"
#include "configuration.h" #include "configuration.h"
#include <OLED.hpp> #include <OLED.hpp>
#include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@@ -209,21 +210,18 @@ void OLED::drawChar(const uint16_t charCode, const FontStyle fontStyle, const ui
* of the indicator in pixels (0..<16). * of the indicator in pixels (0..<16).
*/ */
void OLED::drawScrollIndicator(uint8_t y, uint8_t height) { void OLED::drawScrollIndicator(uint8_t y, uint8_t height) {
union u_type {
uint32_t whole;
uint8_t strips[4];
} column;
column.whole = (1 << height) - 1; // preload a set of set bits of height
column.whole <<= y; // Shift down by the y value
const uint32_t whole = ((1 << height) - 1) << y; // preload a set of set bits of height
// Shift down by the y value
const uint8_t strips[4] = {static_cast<uint8_t>(whole & 0xff), static_cast<uint8_t>((whole & 0xff00) >> 8 * 1), static_cast<uint8_t>((whole & 0xff0000) >> 8 * 2),
static_cast<uint8_t>((whole & 0xff000000) >> 8 * 3)};
// Draw a one pixel wide bar to the left with a single pixel as // Draw a one pixel wide bar to the left with a single pixel as
// the scroll indicator. // the scroll indicator.
fillArea(OLED_WIDTH - 1, 0, 1, 8, column.strips[0]); fillArea(OLED_WIDTH - 1, 0, 1, 8, strips[0]);
fillArea(OLED_WIDTH - 1, 8, 1, 8, column.strips[1]); fillArea(OLED_WIDTH - 1, 8, 1, 8, strips[1]);
#if OLED_HEIGHT == 32 #if OLED_HEIGHT == 32
fillArea(OLED_WIDTH - 1, 16, 1, 8, column.strips[2]); fillArea(OLED_WIDTH - 1, 16, 1, 8, strips[2]);
fillArea(OLED_WIDTH - 1, 24, 1, 8, column.strips[3]); fillArea(OLED_WIDTH - 1, 24, 1, 8, strips[3]);
#endif #endif
} }

View File

@@ -582,7 +582,6 @@ static void setBoostTemp(void) {
if (value >= MAX_TEMP_F) { if (value >= MAX_TEMP_F) {
value = 0; // jump to off value = 0; // jump to off
} }
setSettingValue(SettingsOptions::BoostTemp, value);
} else { } else {
if (value == 0) { if (value == 0) {
value = MIN_BOOST_TEMP_C; // loop back at 250 value = MIN_BOOST_TEMP_C; // loop back at 250
@@ -657,14 +656,13 @@ static void setProfileTemp(const enum SettingsOptions option) {
if (temp > MAX_TEMP_F) { if (temp > MAX_TEMP_F) {
temp = MIN_TEMP_F; temp = MIN_TEMP_F;
} }
setSettingValue(option, temp);
} else { } else {
temp += 5; temp += 5;
if (temp > MAX_TEMP_C) { if (temp > MAX_TEMP_C) {
temp = MIN_TEMP_C; temp = MIN_TEMP_C;
} }
setSettingValue(option, temp);
} }
setSettingValue(option, temp);
} }
static void setProfilePreheatTemp(void) { return setProfileTemp(SettingsOptions::ProfilePreheatTemp); } static void setProfilePreheatTemp(void) { return setProfileTemp(SettingsOptions::ProfilePreheatTemp); }
@@ -715,14 +713,13 @@ static void setSleepTemp(void) {
if (temp > 580) { if (temp > 580) {
temp = 60; temp = 60;
} }
setSettingValue(SettingsOptions::SleepTemp, temp);
} else { } else {
temp += 10; temp += 10;
if (temp > 300) { if (temp > 300) {
temp = 10; temp = 10;
} }
setSettingValue(SettingsOptions::SleepTemp, temp);
} }
setSettingValue(SettingsOptions::SleepTemp, temp);
} }
static void displaySleepTemp(void) { OLED::printNumber(getSettingValue(SettingsOptions::SleepTemp), 3, FontStyle::LARGE); } static void displaySleepTemp(void) { OLED::printNumber(getSettingValue(SettingsOptions::SleepTemp), 3, FontStyle::LARGE); }
@@ -762,12 +759,11 @@ static bool showHallEffect(void) { return getHallSensorFitted(); }
static void displayHallEffectSleepTime(void) { static void displayHallEffectSleepTime(void) {
if (getSettingValue(SettingsOptions::HallEffectSleepTime)) { if (getSettingValue(SettingsOptions::HallEffectSleepTime)) {
OLED::printNumber(getSettingValue(SettingsOptions::HallEffectSleepTime) * 5, 2, FontStyle::LARGE, false); OLED::printNumber(getSettingValue(SettingsOptions::HallEffectSleepTime) * 5, 2, FontStyle::LARGE, false);
OLED::print(LargeSymbolSeconds, FontStyle::LARGE);
} else { } else {
// When sleep time is set to zero, we sleep for 1 second anyways. This is the default. // When sleep time is set to zero, we sleep for 1 second anyways. This is the default.
OLED::printNumber(1, 2, FontStyle::LARGE, false); OLED::printNumber(1, 2, FontStyle::LARGE, false);
OLED::print(LargeSymbolSeconds, FontStyle::LARGE);
} }
OLED::print(LargeSymbolSeconds, FontStyle::LARGE);
} }
#endif /* HALL_SENSOR */ #endif /* HALL_SENSOR */