Skip to content

Commit

Permalink
Merge branch 'testing' into newfx
Browse files Browse the repository at this point in the history
  • Loading branch information
ccMSC committed Dec 31, 2015
2 parents 8361ab4 + 334b066 commit bd8ab4e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
beta-v0.2.2+t05
beta-v0.2.2+t06
2 changes: 1 addition & 1 deletion src/ckb/kb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ void Kb::save(){

void Kb::autoSave(){
quint64 now = QDateTime::currentMSecsSinceEpoch();
if(now >= lastAutoSave + 15 * 1000 && !CkbSettings::isBusy()){
if(needsSave() && now >= lastAutoSave + 15 * 1000 && !CkbSettings::isBusy()){
save();
lastAutoSave = now;
}
Expand Down
6 changes: 4 additions & 2 deletions src/ckb/kb.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ class Kb : public QThread
void load();
void save();
bool needsSave() const;
// Auto-save every 15s (if settings have changed, and no other writes are in progress)
void autoSave();

void hwSave();

Expand All @@ -104,8 +102,12 @@ class Kb : public QThread
void fwUpdateFinished(bool succeeded);

public slots:
// Send lighting and settings to the driver
void frameUpdate();

// Auto-save every 15s (if settings have changed, and no other writes are in progress)
void autoSave();

private slots:
// Processes lines read from the notification node
void readNotify(QString line);
Expand Down
1 change: 1 addition & 0 deletions src/ckb/kbmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ void KbManager::scanKeyboards(){
emit kbConnected(kb);
kb->load();
connect(_eventTimer, SIGNAL(timeout()), kb, SLOT(frameUpdate()));
connect(_scanTimer, SIGNAL(timeout()), kb, SLOT(autoSave()));
}
}

0 comments on commit bd8ab4e

Please sign in to comment.