Compare commits
2 Commits
e8da086707
...
f17d137d25
Author | SHA1 | Date |
---|---|---|
|
f17d137d25 | |
|
1fbde2d366 |
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.8.162",
|
"version": "1.8.164",
|
||||||
"ext_port": 1111,
|
"ext_port": 1111,
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"mcopy": {
|
"mcopy": {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -78,7 +78,7 @@ class WebView {
|
||||||
this.digitalWindow.webContents.send('display', { src: normalSrc });
|
this.digitalWindow.webContents.send('display', { src: normalSrc });
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
this.log.error(err);
|
this.log.error('Error displaying ${normalSrc}', err);
|
||||||
}
|
}
|
||||||
this.showing = true;
|
this.showing = true;
|
||||||
return new Promise(function (resolve) {
|
return new Promise(function (resolve) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -130,9 +130,9 @@ class FilmOut {
|
||||||
this.log.error(err, 'FILMOUT', true, true);
|
this.log.error(err, 'FILMOUT', true, true);
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
if (this.server.displayImage(path)) {
|
if (this.server.useServer()) {
|
||||||
|
this.server.displayImage(path);
|
||||||
await (0, delay_1.delay)(20);
|
await (0, delay_1.delay)(20);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
await this.display.show(path);
|
await this.display.show(path);
|
||||||
await (0, delay_1.delay)(20);
|
await (0, delay_1.delay)(20);
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mcopy-app",
|
"name": "mcopy-app",
|
||||||
"version": "1.8.162",
|
"version": "1.8.164",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mcopy-app",
|
"name": "mcopy-app",
|
||||||
"version": "1.8.162",
|
"version": "1.8.164",
|
||||||
"description": "GUI for the mcopy small gauge film optical printer platform",
|
"description": "GUI for the mcopy small gauge film optical printer platform",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.8.162",
|
"version": "1.8.164",
|
||||||
"ext_port": 1111,
|
"ext_port": 1111,
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"mcopy": {
|
"mcopy": {
|
||||||
|
|
|
@ -7,19 +7,57 @@
|
||||||
|
|
||||||
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUM, PIN, NEO_GRBW + NEO_KHZ800);
|
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUM, PIN, NEO_GRBW + NEO_KHZ800);
|
||||||
|
|
||||||
|
|
||||||
|
String strR = "000";
|
||||||
|
String strG = "000";
|
||||||
|
String strB = "000";
|
||||||
|
String strW = "000"; //w = brightness
|
||||||
|
|
||||||
|
volatile int r = 0;
|
||||||
|
volatile int g = 0;
|
||||||
|
volatile int b = 0;
|
||||||
|
volatile int w = 0;
|
||||||
|
|
||||||
float brightness = 0.2;
|
float brightness = 0.2;
|
||||||
int b = floor(brightness * 255.0f);
|
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
|
w = floor(brightness * 255.0f);
|
||||||
Serial.begin(56700);
|
Serial.begin(56700);
|
||||||
pixels.begin();
|
pixels.begin();
|
||||||
pixels.setBrightness(b);
|
pixels.setBrightness(w);
|
||||||
pixels.fill( 0xFFFFFF);
|
pixels.fill( 0xFFFFFF);
|
||||||
pixels.show();
|
pixels.show();
|
||||||
Serial.print("brightness: ");
|
Serial.print("brightness: ");
|
||||||
Serial.println(b);
|
Serial.println(w);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setColor (int r, int g, int b, int w) {
|
||||||
|
pixels.setBrightness(w);
|
||||||
|
pixels.fill(pixels.Color(r, g, b));
|
||||||
|
pixels.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop () {
|
void loop () {
|
||||||
pixels.show();
|
pixels.show();
|
||||||
|
//delay(1000);
|
||||||
|
r = 255;
|
||||||
|
g = 161;
|
||||||
|
b = 72;
|
||||||
|
/* int i = random(0, 3);
|
||||||
|
uint16_t total = 230 * 3;
|
||||||
|
if (i == 0) {
|
||||||
|
r = random(205, 256);
|
||||||
|
g = random(205, 256);
|
||||||
|
b = total - r - g;
|
||||||
|
; } else if (i == 1) {
|
||||||
|
r = random(205, 256);
|
||||||
|
b = random(205, 256);
|
||||||
|
g = total - r - b;
|
||||||
|
} else if (i == 2) {
|
||||||
|
b = random(205, 256);
|
||||||
|
g = random(205, 256);
|
||||||
|
r = total - g - b;
|
||||||
|
}*/
|
||||||
|
setColor(r, g, b, w);
|
||||||
|
//delay(1000);
|
||||||
}
|
}
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "mcopy",
|
"name": "mcopy",
|
||||||
"version": "1.8.162",
|
"version": "1.8.164",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "mcopy",
|
"name": "mcopy",
|
||||||
"version": "1.8.162",
|
"version": "1.8.164",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"alert": "file:app/lib/alert",
|
"alert": "file:app/lib/alert",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mcopy",
|
"name": "mcopy",
|
||||||
"version": "1.8.162",
|
"version": "1.8.164",
|
||||||
"description": "Small gauge film optical printer platform",
|
"description": "Small gauge film optical printer platform",
|
||||||
"main": "build.js",
|
"main": "build.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.8.162",
|
"version": "1.8.164",
|
||||||
"ext_port": 1111,
|
"ext_port": 1111,
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"mcopy": {
|
"mcopy": {
|
||||||
|
|
|
@ -132,7 +132,7 @@ export class Camera {
|
||||||
const cmd : string = this.cfg.arduino.cmd[this.id];
|
const cmd : string = this.cfg.arduino.cmd[this.id];
|
||||||
let ms : number;
|
let ms : number;
|
||||||
if (this.filmout.state.enabled) {
|
if (this.filmout.state.enabled) {
|
||||||
await this.filmout.start()
|
await this.filmout.start();
|
||||||
}
|
}
|
||||||
if (this.processing) {
|
if (this.processing) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -89,7 +89,7 @@ class WebView {
|
||||||
try {
|
try {
|
||||||
this.digitalWindow.webContents.send('display', { src : normalSrc });
|
this.digitalWindow.webContents.send('display', { src : normalSrc });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.log.error(err);
|
this.log.error('Error displaying ${normalSrc}', err);
|
||||||
}
|
}
|
||||||
this.showing = true;
|
this.showing = true;
|
||||||
|
|
||||||
|
|
|
@ -163,9 +163,9 @@ export class FilmOut {
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.server.displayImage(path)) {
|
if (this.server.useServer()) {
|
||||||
await delay(20)
|
this.server.displayImage(path);
|
||||||
return
|
await delay(20);
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.display.show(path);
|
await this.display.show(path);
|
||||||
|
|
|
@ -124,7 +124,6 @@ export class Server {
|
||||||
await this.cmd(ws, 'mcopy')
|
await this.cmd(ws, 'mcopy')
|
||||||
this.log.info('Client connected')
|
this.log.info('Client connected')
|
||||||
this.notify('Client connected', `Forwarding digital display to client: ${address}`)
|
this.notify('Client connected', `Forwarding digital display to client: ${address}`)
|
||||||
|
|
||||||
}.bind(this))
|
}.bind(this))
|
||||||
this.log.info(`Websocket server started!`)
|
this.log.info(`Websocket server started!`)
|
||||||
this.log.info(`WSS [ ws://localhost:${this.wsPort} ]`)
|
this.log.info(`WSS [ ws://localhost:${this.wsPort} ]`)
|
||||||
|
|
Loading…
Reference in New Issue