Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ build-internal: prepare-internal
cd $(WORKDIR); \
debuild --prepend-path=/usr/local/go/bin/ --preserve-env -us -uc; \
cp ../*.deb /build/;
cp ./debian/octoscreen/usr/bin/OctoScreen /build/;


prepare-internal:
dch --create -v $(VERSION)-1 --package $(PACKAGE_NAME) empty; \
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OctoScreen [![GitHub release](https://img.shields.io/github/release/boardthatpowder/OctoScreen.svg)](https://github.com/boardthatpowder/OctoScreen/releases) [![license](https://img.shields.io/github/license/boardthatpowder/OctoScreen.svg)]()
# OctoScreen [![GitHub release](https://img.shields.io/github/release/boardthatpowder/OctoScreen.svg)](https://github.com/Hypertoken/OctoScreen/releases) [![license](https://img.shields.io/github/license/boardthatpowder/OctoScreen.svg)]()

_OctoScreen_, LCD touch interface for our Octoprint based on GTK+3, that allows you to control your 3D Printer, like you can do with any [LCD panel](http://reprap.org/wiki/RepRapTouch), but using _OctoPrint_ and a Raspberry Pi. It's a _X application_ to be executed directly in the X Server without any windows
manager or browser, as _frontend of a [OctoPrint](http://octoprint.org) server_ in a Raspberry Pi
Expand Down Expand Up @@ -36,7 +36,7 @@ resources.
This is the main reason because I develop this X application to be executed
in my 3d printer.

## [Roadmap](https://github.com/boardthatpowder/OctoScreen/projects/2)
## [Roadmap](https://github.com/Hypertoken/OctoScreen/projects/2)

Installation
------------
Expand All @@ -61,12 +61,12 @@ Also you may need to install video drive, usually **no screens found** error ind
### Install from .deb package

The recommended way to install *OctoScreen* is use the `.deb` packages
from the [Releases](https://github.com/boardthatpowder/OctoScreen/releases) page. The packages
from the [Releases](https://github.com/Hypertoken/OctoScreen/releases) page. The packages
are available for Debian Stretch based distributions such as Raspbian and OctoPi.

For example for a Raspbian Stretch:
```sh
wget https://github.com/boardthatpowder/OctoScreen/releases/download/v2.5.1/octoscreen_2.5-1_armhf.deb
wget https://github.com/Hypertoken/OctoScreen/releases/download/v2.5.1/octoscreen_2.5-1_armhf.deb
sudo dpkg -i octoscreen_2.5-1_armhf.deb
```

Expand Down Expand Up @@ -116,7 +116,7 @@ the `.deb` package you can configure it at `/etc/octoscreen/config`.

- `OCTOSCREEN_RESOLUTION` - Resolution of the application, should be configured to the resolution of your screen. Optimal resolution for OctoScreen is no less than 800x480, so if the physical resolution of your screen is 480x320, it's recommended to set the software resolution 800x533. If you are using Raspbian you can do it by changing [`hdmi_cvt`](https://www.raspberrypi.org/documentation/configuration/config-txt/video.md) param in `/boot/config.txt` file.

### [Menu Configuration](https://github.com/boardthatpowder/OctoScreen/blob/master/docs/README.md)
### [Menu Configuration](https://github.com/Hypertoken/OctoScreen/blob/master/docs/README.md)

### Custom controls and commands

Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Build-Depends: debhelper (>= 9),
libcairo2-dev (>= 1.14.0),
libgtk-3-dev (>= 3.14)
Standards-Version: 4.1.1
Homepage: https://github.com/boardthatpowder/OctoScreen
Homepage: https://github.com/Hypertoken/OctoScreen
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-go/packages/octoscreen.git
Vcs-Git: https://anonscm.debian.org/git/pkg-go/packages/octoscreen.git
XS-Go-Import-Path: github.com/boardthatpowder/OctoScreen
Expand Down
2 changes: 1 addition & 1 deletion debian/copyright
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: OctoScreen
Source: https://github.com/boardthatpowder/OctoScreen
Source: https://github.com/Hypertoken/OctoScreen

Files: *
Copyright: 2017 Máximo Cuadros
Expand Down
2 changes: 1 addition & 1 deletion debian/watch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=3
opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/octoscreen-\$1\.tar\.gz/,\
uversionmangle=s/(\d)[_\.\-\+]?(RC|rc|pre|dev|beta|alpha)[.]?(\d*)$/\$1~\$2\$3/ \
https://github.com/boardthatpowder/OctoScreen/tags .*/v?(\d\S*)\.tar\.gz
https://github.com/Hypertoken/OctoScreen/tags .*/v?(\d\S*)\.tar\.gz
62 changes: 62 additions & 0 deletions styles/z-bolt/images/psu-off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 63 additions & 0 deletions styles/z-bolt/images/psu-off2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 63 additions & 0 deletions styles/z-bolt/images/psu-on.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 8 additions & 10 deletions ui/idle_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (m *idleStatusPanel) initialize() {

if m.UI.Settings == nil || len(m.UI.Settings.MenuStructure) == 0 {
Logger.Info("Loading default menu")
menuItems = getDeafultMenu()
menuItems = getDefaultMenu()
} else {
Logger.Info("Loading octo menu")
menuItems = m.UI.Settings.MenuStructure
Expand Down Expand Up @@ -82,29 +82,28 @@ func (m *idleStatusPanel) showTools() {
g := MustGrid()
g.SetRowHomogeneous(true)
g.SetColumnHomogeneous(true)

m.Grid().Attach(g, 1, 0, 2, 3)

g.Attach(m.tool0, 1, 0, 2, 1)
g.Attach(m.bed, 1, 1, 2, 1)
g.Attach(m.tool0, 1, 0, 2, 1)
g.Attach(m.bed, 1, 1, 2, 1)

case 2:
m.Grid().Attach(m.tool0, 1, 0, 2, 1)
m.Grid().Attach(m.tool1, 1, 1, 2, 1)
m.Grid().Attach(m.bed, 1, 2, 2, 1)
m.Grid().Attach(m.bed, 1, 2, 2, 1)

case 3:
m.Grid().Attach(m.tool0, 1, 0, 1, 1)
m.Grid().Attach(m.tool1, 2, 0, 1, 1)
m.Grid().Attach(m.tool2, 1, 1, 2, 1)
m.Grid().Attach(m.bed, 1, 2, 2, 1)
m.Grid().Attach(m.bed, 1, 2, 2, 1)

case 4:
m.Grid().Attach(m.tool0, 1, 0, 1, 1)
m.Grid().Attach(m.tool1, 2, 0, 1, 1)
m.Grid().Attach(m.tool2, 1, 1, 1, 1)
m.Grid().Attach(m.tool3, 2, 1, 1, 1)
m.Grid().Attach(m.bed, 1, 2, 2, 1)
m.Grid().Attach(m.bed, 1, 2, 2, 1)
}

}

func (m *idleStatusPanel) updateTemperature() {
Expand Down Expand Up @@ -159,7 +158,6 @@ type ToolHeatup struct {
}

func ToolHeatupNew(num int, printer *octoprint.Client) *ToolHeatup {

var (
image string
tool string
Expand Down
3 changes: 1 addition & 2 deletions ui/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ func (m *menuPanel) initialize() {
m.arrangeMenuItems(m.g, m.items, 4)
}

func getDeafultMenu() []octoprint.MenuItem {

func getDefaultMenu() []octoprint.MenuItem {
default_menu := `[
{
"name": "Home",
Expand Down
12 changes: 11 additions & 1 deletion ui/splash.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ package ui

import (
"github.com/gotk3/gotk3/gtk"
"time"
)

type SplashPanel struct {
CommonPanel
Label *gtk.Label
RetryButton *gtk.Button
PSUButton *PSUControl
}

func NewSplashPanel(ui *UI) *SplashPanel {
Expand All @@ -23,6 +25,7 @@ func (m *SplashPanel) initialize() {
m.Label.SetLineWrap(true)
m.Label.SetMaxWidthChars(30)
m.Label.SetText("Initializing printer...")
m.b = NewBackgroundTask(time.Second*10, m.update)

main := MustBox(gtk.ORIENTATION_VERTICAL, 15)
main.SetVAlign(gtk.ALIGN_END)
Expand All @@ -42,11 +45,14 @@ func (m *SplashPanel) initialize() {
func (m *SplashPanel) createActionBar() gtk.IWidget {
bar := MustBox(gtk.ORIENTATION_HORIZONTAL, 5)
bar.SetHAlign(gtk.ALIGN_END)

m.PSUButton = PSUControlNew(m.UI, m.UI.Printer)
m.PSUButton.SetProperty("width-request", m.Scaled(100))
m.PSUButton.SetProperty("visible", true)
m.RetryButton = MustButtonImageStyle("Retry", "refresh.svg", "color2", m.releaseFromHold)
m.RetryButton.SetProperty("width-request", m.Scaled(100))
m.RetryButton.SetProperty("visible", true)
bar.Add(m.RetryButton)
bar.Add(m.PSUButton)
ctx, _ := m.RetryButton.GetStyleContext()
ctx.AddClass("hidden")

Expand Down Expand Up @@ -84,3 +90,7 @@ func (m *SplashPanel) showNetwork() {
func (m *SplashPanel) showSystem() {
m.UI.Add(SystemPanel(m.UI, m))
}

func (m *SplashPanel) update() {
m.PSUButton.update()
}
Loading