Skip to content

Commit

Permalink
Merge pull request #34 from rodgomesc/fix28
Browse files Browse the repository at this point in the history
fix #13 #28 - now color changes are kept after reboot without additional configurations
  • Loading branch information
rodgomesc authored Dec 27, 2019
2 parents ffa1307 + 584093f commit 371587e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 56 deletions.
52 changes: 1 addition & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ ITE Device(8291) is integrated in widely-used Tongfang gaming laptop barebones:
- HIDevolution EVOC 16GK5 (US reseller)
- Obsidian GK5CP (PT reseller)
- Vulcan JinGang GTX Standard

## Project status

#### Working:
Expand Down Expand Up @@ -135,57 +136,6 @@ To disable all keys:
aucc -d
```

## Add aucc to run on System Startup in 3 steps.

## The following commands need to be executed with root (superuser), or using sudo "command"

### step 1:

create `aucc.service` in `/etc/systemd/system`

```bash
vi /etc/systemd/system/aucc.service
```

### step 2:

press i to enter in vim edit mode and paste folow (use the command in "ExecStart" line to specify aucc options):

```bash
[Unit]
Description=Avell Keyboard Configuration
[Service]
Type=oneshot
ExecStart=/usr/local/bin/aucc -c red -b 1
[Install]
WantedBy=multi-user.target
```

to write and save the content press `ESC` and hold `Shift+zz`

for more options about customize colors, brightness and styles, folow [Usage](https://github.com/rodgomesc/avell-unofficial-control-center#usage) Instructions

### step 3:

give permissions enable service and put it to work:

```bash
chmod 755 aucc.service # give permissions
systemctl enable aucc.service # enable service
systemctl daemon-reload # reload daemon for apply changes
systemctl start aucc.service # start service
systemctl status aucc.service #check status
```

reboot and enjoy :)

if you want to change something in service file don't forget to reload the daemon and restart service:

```bash
systemctl daemon-reload
systemctl restart aucc.service
```

### Thanks to

1. [Avell](https://avell.com.br/) - For this amazing Laptop
Expand Down
8 changes: 6 additions & 2 deletions aucc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,12 @@ def adjust_brightness(self, brightness=None):
else:
self.adjust_brightness(4)

def color_scheme_setup(self):
self.ctrl_write(0x12, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00)
def color_scheme_setup(self, save_changes=0x01):
'''
options available: (0x00 for no, 0x01 for yes)
purpose: write changes on chip to keep current color on reboot
'''
self.ctrl_write(0x12, 0x00, 0x00, 0x08, save_changes, 0x00, 0x00, 0x00)

def mono_color_setup(self, color_scheme):

Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ def find_all(folder):
for filename in filenames:
yield os.path.join('..', path, filename)


setup(
name='avell-unofficial-control-center',
version='1.0.2',
version='1.0.3',
description='A Project to provide a driver and interface to control keyboard rgb led of ITE 8291 like Avell laptops', # Required
entry_points={'console_scripts': [
'aucc = aucc.main:main']},
Expand All @@ -28,8 +29,8 @@ def find_all(folder):
package_data={'': list(find_all('aucc'))},
include_package_data=True,
install_requires=[
'pyusb',
'elevate'
'pyusb',
'elevate'
],
project_urls={
'Bug Reports': 'https://github.com/rodgomesc/avell-unofficial-control-center/issues',
Expand Down

1 comment on commit 371587e

@LeoniePhiline
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rodgomesc Cool! :) Could you publish to pip3? It says 1.0.1 is the latest version.

Please sign in to comment.