Advertisement
Guest User

Untitled

a guest
Aug 14th, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. diff --git a/src/hal/drivers/mesa-hostmot2/hostmot2.h b/src/hal/drivers/mesa-hostmot2/hostmot2.h
  2. index 63093c9..57b057f 100644
  3. --- a/src/hal/drivers/mesa-hostmot2/hostmot2.h
  4. +++ b/src/hal/drivers/mesa-hostmot2/hostmot2.h
  5. @@ -354,9 +354,9 @@ typedef struct {
  6.  
  7. } hal;
  8.  
  9. - long long accum;
  10. - long long offset;
  11. - u32 old_reg;
  12. + __s64 accum;
  13. + __s64 offset;
  14. + __u32 old_reg;
  15. u32 index_cnts;
  16.  
  17. } hm2_resolver_instance_t;
  18. diff --git a/src/hal/drivers/mesa-hostmot2/resolver.c b/src/hal/drivers/mesa-hostmot2/resolver.c
  19. index b52d4d4..f678c62 100644
  20. --- a/src/hal/drivers/mesa-hostmot2/resolver.c
  21. +++ b/src/hal/drivers/mesa-hostmot2/resolver.c
  22. @@ -320,7 +320,7 @@ void hm2_resolver_process_tram_read(hostmot2_t *hm2, long period) {
  23.  
  24. // PROCESS THE REGISTERS, SET THE PINS
  25.  
  26. - res->accum += (signed long)(hm2->resolver.position_reg[i] - res->old_reg );
  27. + res->accum += (__s32)(hm2->resolver.position_reg[i] - res->old_reg );
  28. if ((res->old_reg ^ hm2->resolver.position_reg[i]) & 0x80000000){
  29. if (++(res->index_cnts) >= res->hal.param.index_div){
  30. res->index_cnts = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement