Changed cosmetical things Travis CI was complaining about.
This commit is contained in:
parent
2abaab1769
commit
1376f5f6be
@ -112,7 +112,7 @@ class ALSA(IntervalModule):
|
|||||||
dbMin_norm = self.exp10((dbMin - dbMax) / 6000.0)
|
dbMin_norm = self.exp10((dbMin - dbMax) / 6000.0)
|
||||||
|
|
||||||
vol = (dbCur_norm - dbMin_norm) / (1 - dbMin_norm)
|
vol = (dbCur_norm - dbMin_norm) / (1 - dbMin_norm)
|
||||||
vol = int(round(vol * 100,0))
|
vol = int(round(vol * 100, 0))
|
||||||
|
|
||||||
return vol
|
return vol
|
||||||
else:
|
else:
|
||||||
@ -136,7 +136,7 @@ class ALSA(IntervalModule):
|
|||||||
elif direction == "dec":
|
elif direction == "dec":
|
||||||
dbNew = max(self.dbMin, floor(((6000.0 * log10(vol)) + dbMax) / 100))
|
dbNew = max(self.dbMin, floor(((6000.0 * log10(vol)) + dbMax) / 100))
|
||||||
|
|
||||||
volNew = int(round(self.map_db(dbNew, self.dbMin, self.dbMax, 0, 100),0))
|
volNew = int(round(self.map_db(dbNew, self.dbMin, self.dbMax, 0, 100), 0))
|
||||||
|
|
||||||
return volNew
|
return volNew
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ class ALSA(IntervalModule):
|
|||||||
|
|
||||||
def get_db(self):
|
def get_db(self):
|
||||||
db = (((self.dbMax - self.dbMin) / 100) * self.alsamixer.getvolume()[self.channel]) + self.dbMin
|
db = (((self.dbMax - self.dbMin) / 100) * self.alsamixer.getvolume()[self.channel]) + self.dbMin
|
||||||
db = int(round(db,0))
|
db = int(round(db, 0))
|
||||||
|
|
||||||
return db
|
return db
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user