Janis Streib
19.05.23 b21ff09151ca7e87348f1ea38944decc1f46f5db
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// G4Hub.cpp: implementation of the CG4Hub class.
//
//////////////////////////////////////////////////////////////////////
 
 
#include "G4Hub.h"
#include <string.h>
 
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CG4Hub::CG4Hub()
{
    memset(m_col,0,sizeof(float)*3);    // black
    for (int i=0;i<3;i++)
        m_senActive[i]=false;
}
 
CG4Hub::~CG4Hub()
{
}
 
void CG4Hub::SetPnoData(float *pno,int sens)
{
  //    float scale=2.0f;
  //    float scale=0.01;
  float scale=1.0f;
    memcpy(m_pno[sens],pno,sizeof(float)*6);
    for (int i=0;i<3;i++)
        m_pno[sens][i]*=scale;
    m_senActive[sens]=true;
}
 
int CG4Hub::GetId()
{
    return m_id;
}
uint32_t CG4Hub::GetDigIOData()
{
    return digio;
}
void CG4Hub::SetDigIOData(uint32_t data)
{
    digio = data;
}
 
bool CG4Hub::IsSenActive(int i)
{
    return m_senActive[i];
}
 
 
void CG4Hub::SetId(int id)
{
    m_id=id;
}
//#include <stdio.h>
float (*CG4Hub::GetPnoData())[6]
{
    return m_pno;
}