Giter Site home page Giter Site logo

pcsensor's Introduction

pcsensor

PCSensor / TEMPer2 driver for linux

This is based on PCSensor v. 1.0.1 by Juan Carlos Perez

All I've done is tweak the tool to output both the temperature from the internal as well as the external sensor.

/*

  • pcsensor.c by Juan Carlos Perez (c) 2011 ([email protected])
  • based on Temper.c by Robert Kavaler (c) 2009 (relavak.com)
  • All rights reserved.
  • 2011/08/30 Thanks to EdorFaus: bugfix to support negative temperatures
  • Temper driver for linux. This program can be compiled either as a library
  • or as a standalone program (-DUNIT_TEST). The driver will work with some
  • TEMPer usb devices from RDing (www.PCsensor.com).
  • Redistribution and use in source and binary forms, with or without
  • modification, are permitted provided that the following conditions are met:
  • * Redistributions of source code must retain the above copyright
    
  •   notice, this list of conditions and the following disclaimer.
    
  • THIS SOFTWARE IS PROVIDED BY Juan Carlos Perez ''AS IS'' AND ANY
  • EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  • WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  • DISCLAIMED. IN NO EVENT SHALL Robert kavaler BE LIABLE FOR ANY
  • DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  • (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  • LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  • ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  • (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  • SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

*/

pcsensor's People

Contributors

peterfarsinsen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pcsensor's Issues

Problems with temperatures below -3.8 C

Hello,

I use your driver with a Temper2 and and a Raspberry Pi. It works great until the temperature goes under -3.8 C. Whatever the temperature is outside the driver will never report lower than this. I tried a second Temper2 unit with the same result. Could it be a bug in your driver?

Here is a graph to illustrate the problem.
http://i.imgur.com/MTD4G6w.jpg

Blue Skies,
/David

Bugfix for debug mode

In method ini_control_transfer there is the array question[].
It is 2 bytes in size.

char question[] = { 0x01,0x01 };

however, 8 bytes are expected in the for loop. This results is a buffer overflow.
if(debug) { for (i=0;i<reqIntLen; i++) fprintf(stderr, "%02x ",question[i] & 0xFF); fprintf(stderr, "\n"); }

better is:
for (i=0;i<2; i++) or sizeof

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.