예제 #1
0
	def EventMethods_DiskInfo(self):
		blackGridNum = (10 * SysInfo.getDiskInfo()['use%'] + 50) / 100
		line_2 = ''
		for i in range(0, blackGridNum):
			line_2 = line_2 + chr(5)
		for i in range(0, 10 - blackGridNum):
			line_2 = line_2 + chr(6)
		self.message('Disk used: ' + str(SysInfo.getDiskInfo()['used']) + 'GB\n' + line_2 + ' ' + str(SysInfo.getDiskInfo()['use%']) + '%')
예제 #2
0
 def showNetworkInfo(self, networkInfo):
     if len(networkInfo) > 0:
         self.message(
             chr(2) + SysInfo.getNetInfo()[self.NetworkPageId]['name'] +
             ':\n' + chr(3) +
             SysInfo.getNetInfo()[self.NetworkPageId]['ip'])
     else:
         self.message('NONE')
예제 #3
0
 def EventMethods_DiskInfo(self):
     blackGridNum = (10 * SysInfo.getDiskInfo()['use%'] + 50) / 100
     line_2 = ''
     for i in range(0, blackGridNum):
         line_2 = line_2 + chr(5)
     for i in range(0, 10 - blackGridNum):
         line_2 = line_2 + chr(6)
     self.message('Disk used: ' + str(SysInfo.getDiskInfo()['used']) +
                  'GB\n' + line_2 + ' ' +
                  str(SysInfo.getDiskInfo()['use%']) + '%')
예제 #4
0
	def EventMethods_Temperature(self):
		cpuTemperature = SysInfo.getCpuTemperature()
		cursor = int(cpuTemperature * 10)
		if cursor <= 300:
			cursor = 2
		elif cursor >= 500:
			cursor = 13
		else:
			cursor = int((cursor - 300) * 12 / 200) + 2
		# Use private charset
		self.loadCharset('TemperatureExtend')
		line_2 = 'L-' + chr(4) + chr(3) + chr(3) + chr(3) + chr(2) + chr(2) + chr(2) + chr(2) + chr(1) + chr(1) + chr(1) + chr(5) + '-H'
		self.message('CPU: ' + str(cpuTemperature) + chr(6) + 'C\n' + line_2)
		self.blink(cursor, 1)
		self.lcd.noCursor()
		self.AutoRefreshMethod = 'EventMethods_2_1'
		if(self.debug):
			print 'Temperature bar: ' + str(cursor)
예제 #5
0
 def EventMethods_Temperature(self):
     cpuTemperature = SysInfo.getCpuTemperature()
     cursor = int(cpuTemperature * 10)
     if cursor <= 300:
         cursor = 2
     elif cursor >= 500:
         cursor = 13
     else:
         cursor = int((cursor - 300) * 12 / 200) + 2
     # Use private charset
     self.loadCharset('TemperatureExtend')
     line_2 = 'L-' + chr(4) + chr(3) + chr(3) + chr(3) + chr(2) + chr(
         2) + chr(2) + chr(2) + chr(1) + chr(1) + chr(1) + chr(5) + '-H'
     self.message('CPU: ' + str(cpuTemperature) + chr(6) + 'C\n' + line_2)
     self.blink(cursor, 1)
     self.lcd.noCursor()
     self.AutoRefreshMethod = 'EventMethods_2_1'
     if (self.debug):
         print 'Temperature bar: ' + str(cursor)
예제 #6
0
	def EventMethods_NetworkInfo_Down(self):
		networkInfo = SysInfo.getNetInfo()
		self.NetworkPageId = (self.NetworkPageId - 1) % len(networkInfo)
		self.showNetworkInfo(networkInfo)
예제 #7
0
	def EventMethods_NetworkInfo(self):
		self.NetworkPageId = 0
		self.showNetworkInfo(SysInfo.getNetInfo())
예제 #8
0
	def showNetworkInfo(self, networkInfo):
		if len(networkInfo) > 0:
			self.message(chr(2) + SysInfo.getNetInfo()[self.NetworkPageId ]['name'] + ':\n' + chr(3) + SysInfo.getNetInfo()[self.NetworkPageId ]['ip'])
		else:
			self.message('NONE')
예제 #9
0
	def EventMethods_SystemInfo(self):
		self.AutoRefreshMethod = 'EventMethods_0_1'
		self.message('CPU Used: ' + str(SysInfo.getCpuInfo()['used']) + '%\nMEM Free: ' + str(SysInfo.getMemInfo()['free']/1024) + 'MB')
예제 #10
0
 def EventMethods_NetworkInfo_Down(self):
     networkInfo = SysInfo.getNetInfo()
     self.NetworkPageId = (self.NetworkPageId - 1) % len(networkInfo)
     self.showNetworkInfo(networkInfo)
예제 #11
0
 def EventMethods_NetworkInfo(self):
     self.NetworkPageId = 0
     self.showNetworkInfo(SysInfo.getNetInfo())
예제 #12
0
 def EventMethods_SystemInfo(self):
     self.AutoRefreshMethod = 'EventMethods_0_1'
     self.message('CPU Used: ' + str(SysInfo.getCpuInfo()['used']) +
                  '%\nMEM Free: ' +
                  str(SysInfo.getMemInfo()['free'] / 1024) + 'MB')