Changeset 3482


Ignore:
Timestamp:
Dec 7, 2012, 10:20:57 PM (3 years ago)
Author:
quozl
Message:

OLPC XO-1.75 XO-4 - accelerometer informal tests fail second time when the formal test is used between them, fixed by closing accelerometer device after informal tests. #12365.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpu/arm/olpc/roller.fth

    r3421 r3482  
    5757   " acceleration@" accel-ih $call-method  xyz>fraction
    5858;
    59 : init-accelerometer  ( -- )
     59: open-accelerometer  ( -- )
    6060   accel-ih  if  exit  then
    6161   " /accelerometer" open-dev to accel-ih
     
    7070   1 4 a/b>fraction xyz*  to acc-0
    7171[then]
     72;
     73: close-accelerometer  ( -- )
     74   accel-ih close-dev  0 to accel-ih
    7275;
    7376
     
    247250;
    248251: roller  ( -- )
    249    init-accelerometer
     252   open-accelerometer
    250253   init-ball
    251254   text-off
     
    253256   begin  ( update-laptop ) update-ball  d# 50 ms  key? until
    254257   text-on
     258   close-accelerometer
    255259;
    256260
     
    327331;
    328332: clinometer  ( -- )
    329    init-accelerometer
     333   open-accelerometer
    330334   init-ball
    331335   cursor-off
     
    337341   key? until
    338342   cursor-on
     343   close-accelerometer
    339344;
    340345: level  ( -- )
Note: See TracChangeset for help on using the changeset viewer.