mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
api/common: Fix units of Time
Times are internally represented in attoseconds, not picoseconds.
This commit is contained in:
parent
37ba83a44b
commit
a07db6763a
@ -223,10 +223,10 @@ message Ratio
|
||||
double value = 1;
|
||||
}
|
||||
|
||||
// Represents a time delay in picoseconds. Since 10.0.0.
|
||||
// Represents a time delay in attoseconds. Since 10.0.0.
|
||||
message Time
|
||||
{
|
||||
int64 value_ps = 1;
|
||||
int64 value_as = 1;
|
||||
}
|
||||
|
||||
// Corresponds to COLOR4D. Each color channel is a double from 0.0 to 1.0.
|
||||
|
@ -165,7 +165,7 @@ void PAD::Serialize( google::protobuf::Any &aContainer ) const
|
||||
pad.set_number( GetNumber().ToUTF8() );
|
||||
pad.set_type( ToProtoEnum<PAD_ATTRIB, PadType>( GetAttribute() ) );
|
||||
pad.mutable_pad_to_die_length()->set_value_nm( GetPadToDieLength() );
|
||||
pad.mutable_pad_to_die_delay()->set_value_ps( GetPadToDieDelay() );
|
||||
pad.mutable_pad_to_die_delay()->set_value_as( GetPadToDieDelay() );
|
||||
|
||||
google::protobuf::Any padStackMsg;
|
||||
m_padStack.Serialize( padStackMsg );
|
||||
@ -192,7 +192,7 @@ bool PAD::Deserialize( const google::protobuf::Any &aContainer )
|
||||
SetAttribute( FromProtoEnum<PAD_ATTRIB>( pad.type() ) );
|
||||
SetNumber( wxString::FromUTF8( pad.number() ) );
|
||||
SetPadToDieLength( pad.pad_to_die_length().value_nm() );
|
||||
SetPadToDieDelay( pad.pad_to_die_delay().value_ps() );
|
||||
SetPadToDieDelay( pad.pad_to_die_delay().value_as() );
|
||||
|
||||
google::protobuf::Any padStackWrapper;
|
||||
padStackWrapper.PackFrom( pad.pad_stack() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user