Ordinateur de bord pour voiture de collection  6.3
Public Member Functions | List of all members
Compteur Class Reference

Entrées Compteur sur carte Acquisition STM32 sur bus CAN
lit une fréquence et un nombre de ticks sur une entrée impulsionnelle utilise un module ModCompteur. More...

Inheritance diagram for Compteur:
Capteur

Public Member Functions

def __init__ (self, Name, Module, Voie, CoefQ=1, CoefT=1, TpsInib=1)
 The constructor. More...
 
def GetFrequence (self)
 renvoie la fréquence lue lors du dernier Read(). More...
 
def GetPhase (self)
 Return the phase betwin the counter n and the counter n-1 (1 ans 0) More...
 
def Read (self)
 Get an acquisition (frequency, quantity) on counter chanel and return the quantity. More...
 
- Public Member Functions inherited from Capteur
def __init__ (self, Name, Module, Voie)
 The constructor. More...
 
def Compens (self, a=1, b=0)
 entre une valeur de compensation (à supprimer) More...
 
def Switch (self)
 forcement booleen, pas de parametre (à supprimer) More...
 
def Write (self, Val)
 ecrit sur une sortie (PWM ou Tout ou Rien) More...
 

Additional Inherited Members

- Public Attributes inherited from Capteur
 Module
 
 Name
 
 Voie
 

Detailed Description

Entrées Compteur sur carte Acquisition STM32 sur bus CAN
lit une fréquence et un nombre de ticks sur une entrée impulsionnelle utilise un module ModCompteur.

Parameters
Name(string) : le nom du compteur.
Module(CANModule) : instance of CANModule witche the sensor is plug. see CAN_Modules.py
Voie(int) : the chanel (0 to 3)
CoefQ=1(int) : quantity coeficient (ex : size of wheel)
CoefT=1(int) : time coeficient to change Hz to qty/h for example
TpsInib=1: not used.
Date
  • 22/09/2016 Création
  • 5.3 fevrier 2019 Modification
    • __Aquisition() : prise en compte du retour possible de None si erreur BUS CAN
    • ajout de la phase et de la fonction GetPhase
Attention
On the acquisition board with the programme 4.0, the information from counter 0 and 1 are for Igniter, don't use if with is class, use Igniter

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  Name,
  Module,
  Voie,
  CoefQ = 1,
  CoefT = 1,
  TpsInib = 1 
)

The constructor.

Member Function Documentation

◆ GetFrequence()

def GetFrequence (   self)

renvoie la fréquence lue lors du dernier Read().

Don't aquire data from the board.

Returns
(int) the frequency * CoefT

◆ GetPhase()

def GetPhase (   self)

Return the phase betwin the counter n and the counter n-1 (1 ans 0)

Returns
the phase in °

◆ Read()

def Read (   self)

Get an acquisition (frequency, quantity) on counter chanel and return the quantity.

This action reset the counter quantity on the board.

Returns
the number of (ticks * CoefQ) frome last acquisition

Reimplemented from Capteur.


The documentation for this class was generated from the following file: