Skip to content

Commit 8379ee2

Browse files
committed
v2.1.3 (#4) new build script and oslogo command
1 parent ec34ba9 commit 8379ee2

8 files changed

Lines changed: 800 additions & 300 deletions

File tree

build.sh

100644100755
Lines changed: 445 additions & 4 deletions
Large diffs are not rendered by default.

include/apps/misc/pug.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
#ifndef PUG_H
2-
#define PUG_H
1+
// #ifndef PUG_H
2+
// #define PUG_H
33

4-
#include <Arduino.h>
5-
#include <Adafruit_ST7789.h>
4+
// #include <Arduino.h>
5+
// #include <Adafruit_ST7789.h>
66

7-
#define PUG_WIDTH 240
8-
#define PUG_HEIGHT 320
7+
// #define PUG_WIDTH 240
8+
// #define PUG_HEIGHT 320
99

10-
extern bool screenLocked;
11-
void displayPug();
10+
// extern bool screenLocked;
11+
// void displayPug();
1212

13-
#endif
13+
// #endif

include/coresys/commands.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "network.h"
1010
#include "theme.h"
1111
#include "config.h"
12-
#include "pug.h"
12+
// #include "pug.h"
1313
#include "ball.h"
1414
#include "timeutils.h"
1515
#include "kernel.h"

include/drivers/display.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ void scrollUp(int lines = 3);
3232
void scrollDown(int lines = 3);
3333
void scrollToBottom();
3434
void scrollToTop();
35+
3536
void screensaver(int mode);
37+
3638
void showLogo();
39+
40+
void drawScreen();
3741
uint8_t sin8(int angle);
3842

3943
#define SCROLL_BUFFER_SIZE 100

src/apps/games/ball.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
#include <cmath>
5353
#include <vector>
5454

55-
const float GRAVITY = 0.05f;
56-
const float FLOOR_DAMP = 0.85f; /// Vertical energy loss
57-
const float WALL_DAMP = 0.90f; /// Horizontal energy loss
55+
const float GRAVITY = 0.05f;
56+
const float FLOOR_DAMP = 0.85f;
57+
const float WALL_DAMP = 0.90f;
5858

5959
struct Ball {
6060
float x, y;
@@ -79,8 +79,8 @@ void initialiseBall(int ballRadius, bool trail, int numBalls) {
7979
float angle = 2.0f * M_PI * ((float)std::rand() / RAND_MAX);
8080
float speed = 1.5f + (std::rand() / (float)RAND_MAX) * 3.5f;
8181
Ball b;
82-
b.x = 160;
83-
b.y = 115;
82+
b.x = 160;
83+
b.y = 115;
8484
b.speedX = speed * cosf(angle);
8585
b.speedY = speed * sinf(angle);
8686
b.colour = std::rand() % 65536;

src/apps/misc/pug.cpp

Lines changed: 276 additions & 276 deletions
Large diffs are not rendered by default.

src/coresys/commands.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,9 @@ void runCommand(const std::string& cmd_in) {
359359
}
360360
setTheme(args.arg1);
361361
}
362-
else if (baseCmd == "pug") {
363-
displayPug();
364-
}
362+
// else if (baseCmd == "pug") {
363+
// displayPug();
364+
// }
365365
else if (baseCmd == "screensaver" || baseCmd == "ss") {
366366
if (args.arg1.length() == 0) {
367367
printLine("Usage: screensaver <mode>");
@@ -488,7 +488,12 @@ void runCommand(const std::string& cmd_in) {
488488
{
489489
showSettings();
490490
}
491-
491+
492+
else if (baseCmd == "oslogo" || baseCmd == "logo")
493+
{
494+
drawScreen();
495+
}
496+
492497

493498
else {
494499
printLine("Unknown command: " + baseCmd);

src/drivers/display.cpp

Lines changed: 51 additions & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)