'From Squeak3.5 of ''11 April 2003'' [latest update: #5180] on 29 April 2003 at 10:23:40 pm'! "Change Set: KCP-0057-movepowermanagment Date: 29 April 2003 Author: stephane ducasse move the powermanagement stuff from systemDictionary to PowerManagement"! !PowerManagement class methodsFor: 'startup logic' stamp: 'sd 4/29/2003 22:05'! startUp [Preferences turnOffPowerManager ifTrue: [self disablePowerManager]] ifError: []! ! !PowerManagement class methodsFor: 'power management' stamp: 'sd 4/29/2003 21:55'! disablePowerManager self disablePowerManager: 1! ! !PowerManagement class methodsFor: 'power management' stamp: 'sd 4/29/2003 21:56'! disablePowerManager: aInteger "Disable/Enable the architectures power manager by passing in nonzero or zero" "primitiveExternalCall" ^ self! ! !PowerManagement class methodsFor: 'power management' stamp: 'sd 4/29/2003 21:57'! enablePowerManager self disablePowerManager: 0! ! !PowerManagement class methodsFor: 'computing' stamp: 'sd 4/29/2003 21:59'! itsyVoltage "On the Itsy, answer the approximate Vcc voltage. The Itsy will shut itself down when this value reaches 2.0 volts. This method allows one to build a readout of the current battery condition." | n | n _ self getSystemAttribute: 1200. n ifNil: [^ 'no voltage attribute']. ^ (n asNumber / 150.0 roundTo: 0.01) asString , ' volts'! ! !SystemDictionary methodsFor: 'deprecated' stamp: 'sd 4/29/2003 22:03'! disablePowerManager self flag: #deprecated. self error: 'Method Deprecated: Use PowerManagement class>>disablePowerManager'! ! !SystemDictionary methodsFor: 'deprecated' stamp: 'sd 4/29/2003 22:03'! disablePowerManager: aInteger self flag: #deprecated. self error: 'Method Deprecated: Use PowerManagement class>>disablePowerManager:'! ! !SystemDictionary methodsFor: 'deprecated' stamp: 'sd 4/29/2003 22:04'! enablePowerManager self flag: #deprecated. self error: 'Method Deprecated: Use PowerManagement class>>enablePowerManager'! ! !SystemDictionary methodsFor: 'deprecated' stamp: 'sd 4/29/2003 22:04'! itsyVoltage self flag: #deprecated. self error: 'Method Deprecated: Use PowerManagement class>>itsyVoltage'! !