¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

IMPORTANT


 

All:

I was going through the code looking for spots for a speed-up and found the following statement in the INO file, line 665:

? if ( (current_phase > cut_off) & (inspiratory_pause == 0) & (p + 1 < atmospheric_pressure) )

These look very suspicious and should likely be relational operators, not bitwise operators. I checked all uses of the bitwise operators and the rest of them are in the Nano gui file working on the display data. Those likely are bitwise operators, so I think the line above is the only one.

Jack, W8TEE


 

Ha,, ha,,? dumb novice programmer.? ?(me)
I'll fix it immediately.? ?Maybe that is why it didn't work all the time.......
Gordon



On Thu, Apr 16, 2020 at 9:56 AM jjpurdum via <jjpurdum=[email protected]> wrote:
All:

I was going through the code looking for spots for a speed-up and found the following statement in the INO file, line 665:

? if ( (current_phase > cut_off) & (inspiratory_pause == 0) & (p + 1 < atmospheric_pressure) )

These look very suspicious and should likely be relational operators, not bitwise operators. I checked all uses of the bitwise operators and the rest of them are in the Nano gui file working on the display data. Those likely are bitwise operators, so I think the line above is the only one.

Jack, W8TEE


 

Gordon:

These are what I call "flat forehead" mistakes. You know, where you slam the heel of your hand into your forehead while muttering "How could I do that?!". Any programmer worth their salt has a flat forehead.

The latest C++ ANSI standard and the Arduino IDE's GCC compiler supports the following for the relational && operator:

if ( (current_phase > cut_off and inspiratory_pause == 0 and(p + 1 < atmospheric_pressure) )

if you wish to use them. They must be lowercase. However, you could also add the following to the vent.h header file:

#define AND??? and
#define OR????? or

and then it would also allow uppercase letters. (Dennis Ritchie is rolling over in his grave with this prostitution of his beautiful work!)

Jack, W8TEE



On Thursday, April 16, 2020, 9:59:59 AM EDT, Gordon Gibby <docvacuumtubes@...> wrote:


Ha,, ha,,? dumb novice programmer.? ?(me)
I'll fix it immediately.? ?Maybe that is why it didn't work all the time.......
Gordon



On Thu, Apr 16, 2020 at 9:56 AM jjpurdum via <jjpurdum=[email protected]> wrote:
All:

I was going through the code looking for spots for a speed-up and found the following statement in the INO file, line 665:

? if ( (current_phase > cut_off) & (inspiratory_pause == 0) & (p + 1 < atmospheric_pressure) )

These look very suspicious and should likely be relational operators, not bitwise operators. I checked all uses of the bitwise operators and the rest of them are in the Nano gui file working on the display data. Those likely are bitwise operators, so I think the line above is the only one.

Jack, W8TEE


 

OK,, I put in the && operators and vertified that the (VERY PRIMITIVE) assist ventilation works.? ?It it tough to pull the covid-19 test lung stiff lung UP enough to get to -2 cm H2O pressure --- but when you do, it now reliably fires and gives an assist breath.? ?See enclosed Serial.print outputs:? ?(I'm elated!)

Each line comes from a measurement made approximately?every 50 millisecond (for the 10 breaths per minute?I set it to so I could easilyl test it, and also 1:3 ventilation to give my slow reflexes plenty of time to let the test lung fully exhale and THEN grab it to simulate the patient taking a breath.? ?

Great work Jack!!!!? You just built the world's first emergency COVID-19 ventilator with a reliable ASSIST function!!!




check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 29 26 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 32 29 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 17 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 8 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 1 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit -1 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit -1 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 15 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 18 15 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 22 18 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 26 22 3
?No low pressure

check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 29 26 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 32 29 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 17 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 8 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 1 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit -1 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit -1 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 1 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 15 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 18 15 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 22 18 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 25 22 3
?No low pressure

check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 29 25 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 32 29 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 17 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 8 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 1 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 32 3
?

**ASSISTED BREATH**

check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit -2 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 1 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 1 1 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 20 1 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 24 20 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 27 24 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 30 27 3
?No low pressure

check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 33 30 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 36 33 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 21 36 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 9 36 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 2 36 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 36 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 36 3
?

**ASSISTED BREATH**

check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit -2 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 1 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 1 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 19 1 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 22 19 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 26 22 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 29 26 3
?No low pressure

check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 32 29 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 35 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 21 35 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 9 35 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 2 35 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 35 3
?

**ASSISTED BREATH**

check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit -3 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 1 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 1 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 18 1 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 21 18 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 25 21 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 28 25 3
?No low pressure

check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 32 28 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 35 32 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 19 35 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 9 35 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 2 35 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 35 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 35 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 35 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 35 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 35 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 35 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 35 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 35 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 0 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 14 0 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 18 14 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 22 18 3
?check_pressure_limits
current_pressure, peakinspiratory mesured, lowlimit 25 22 3
?No low pressure


On Thu, Apr 16, 2020 at 10:16 AM jjpurdum via <jjpurdum=[email protected]> wrote:
Gordon:

These are what I call "flat forehead" mistakes. You know, where you slam the heel of your hand into your forehead while muttering "How could I do that?!". Any programmer worth their salt has a flat forehead.

The latest C++ ANSI standard and the Arduino IDE's GCC compiler supports the following for the relational && operator:

if ( (current_phase > cut_off and inspiratory_pause == 0 and(p + 1 < atmospheric_pressure) )

if you wish to use them. They must be lowercase. However, you could also add the following to the vent.h header file:

#define AND??? and
#define OR????? or

and then it would also allow uppercase letters. (Dennis Ritchie is rolling over in his grave with this prostitution of his beautiful work!)

Jack, W8TEE



On Thursday, April 16, 2020, 9:59:59 AM EDT, Gordon Gibby <docvacuumtubes@...> wrote:


Ha,, ha,,? dumb novice programmer.? ?(me)
I'll fix it immediately.? ?Maybe that is why it didn't work all the time.......
Gordon



On Thu, Apr 16, 2020 at 9:56 AM jjpurdum via <jjpurdum=[email protected]> wrote:
All:

I was going through the code looking for spots for a speed-up and found the following statement in the INO file, line 665:

? if ( (current_phase > cut_off) & (inspiratory_pause == 0) & (p + 1 < atmospheric_pressure) )

These look very suspicious and should likely be relational operators, not bitwise operators. I checked all uses of the bitwise operators and the rest of them are in the Nano gui file working on the display data. Those likely are bitwise operators, so I think the line above is the only one.

Jack, W8TEE